Closed Alirexaa closed 1 month ago
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.
ManifestUtils
dupe
Example in aspire repo: https://github.com/dotnet/aspire/blob/4c91f09e9c7f84e73eca6932f550475309155abd/tests/Aspire.Hosting.Redis.Tests/AddRedisTests.cs#L96-L120
We need
ManifestUtils
to generate manifest file.