diff --git a/src/StrongTypes.Api.IntegrationTests/Infrastructure/TestWebApplicationFactory.cs b/src/StrongTypes.Api.IntegrationTests/Infrastructure/TestWebApplicationFactory.cs index 868f032e..e2f70a9f 100644 --- a/src/StrongTypes.Api.IntegrationTests/Infrastructure/TestWebApplicationFactory.cs +++ b/src/StrongTypes.Api.IntegrationTests/Infrastructure/TestWebApplicationFactory.cs @@ -16,8 +16,16 @@ namespace StrongTypes.Api.IntegrationTests.Infrastructure; /// public sealed class TestWebApplicationFactory : WebApplicationFactory, IAsyncLifetime { - private readonly MsSqlContainer _sqlContainer = new MsSqlBuilder().Build(); - private readonly PostgreSqlContainer _pgContainer = new PostgreSqlBuilder().Build(); + private const string DockerGroupLabel = "com.docker.compose.project"; + private const string DockerGroupName = "StrongTypes"; + + private readonly MsSqlContainer _sqlContainer = new MsSqlBuilder() + .WithLabel(DockerGroupLabel, DockerGroupName) + .Build(); + + private readonly PostgreSqlContainer _pgContainer = new PostgreSqlBuilder() + .WithLabel(DockerGroupLabel, DockerGroupName) + .Build(); async ValueTask IAsyncLifetime.InitializeAsync() {