-
Notifications
You must be signed in to change notification settings - Fork 150
Closed as not planned
Description
Example in aspire repo:
https://github.com/dotnet/aspire/blob/4c91f09e9c7f84e73eca6932f550475309155abd/tests/Aspire.Hosting.Redis.Tests/AddRedisTests.cs#L96-L120
[Fact]
public async Task VerifyManifest()
{
using var builder = TestDistributedApplicationBuilder.Create();
var redis = builder.AddRedis("redis");
var manifest = await ManifestUtils.GetManifest(redis.Resource);
var expectedManifest = $$"""
{
"type": "container.v0",
"connectionString": "{redis.bindings.tcp.host}:{redis.bindings.tcp.port}",
"image": "{{RedisContainerImageTags.Registry}}/{{RedisContainerImageTags.Image}}:{{RedisContainerImageTags.Tag}}",
"bindings": {
"tcp": {
"scheme": "tcp",
"protocol": "tcp",
"transport": "tcp",
"targetPort": 6379
}
}
}
""";
Assert.Equal(expectedManifest, manifest.ToString());
}We need ManifestUtils to generate manifest file.