Skip to content

Commit

Permalink
one more fix sqlserver container
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsPilgaard committed Oct 6, 2024
1 parent c35964f commit 73768e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ namespace Jordnaer.Tests.Infrastructure;
public class JordnaerWebApplicationFactory : WebApplicationFactory<Program>, IAsyncLifetime
{
private readonly MsSqlContainer _msSqlContainer = new MsSqlBuilder()
.WithName($"SqlServerTestcontainer-{Guid.NewGuid()}")
.Build();
.WithImage("mcr.microsoft.com/mssql/server:2022-latest") // We set a specific image to circumvent this bug: https://github.com/testcontainers/testcontainers-dotnet/issues/1271
.WithName($"SqlServerTestcontainer-{Guid.NewGuid()}")
.Build();

private readonly AzuriteContainer _azureBlobStorageContainer = new AzuriteBuilder()
.WithName($"AzuriteTestcontainer-{Guid.NewGuid()}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Jordnaer.Tests.Infrastructure;
public class SqlServerContainer<TDbContext> : IAsyncLifetime where TDbContext : DbContext
{
public readonly MsSqlContainer Container = new MsSqlBuilder()
.WithImage("mcr.microsoft.com/mssql/server:2022-latest")
.WithImage("mcr.microsoft.com/mssql/server:2022-latest") // We set a specific image to circumvent this bug: https://github.com/testcontainers/testcontainers-dotnet/issues/1271
.WithName($"SqlServerTestcontainer-{Guid.NewGuid()}")
.Build();

Expand Down

0 comments on commit 73768e6

Please sign in to comment.