Skip to content

Ensure all integration have at least one test for manifest #115

@Alirexaa

Description

@Alirexaa

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions