Skip to content

Commit

Permalink
Wait Strategy needs to be changed for TestContainers (#692)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashendrickx authored Aug 21, 2024
1 parent 74ed3d6 commit 3591d04
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/Api.IntegrationTests/PasswordlessApiFixture.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
using DotNet.Testcontainers.Builders;
using Testcontainers.MsSql;
using Xunit;

namespace Passwordless.Api.IntegrationTests;

public class PasswordlessApiFixture : IAsyncDisposable, IAsyncLifetime
{
private readonly MsSqlContainer _dbContainer = new MsSqlBuilder().Build();
private readonly MsSqlContainer _dbContainer = new MsSqlBuilder()
.WithImage("mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04")
.WithWaitStrategy(Wait.ForUnixContainer().UntilCommandIsCompleted("/opt/mssql-tools18/bin/sqlcmd", "-C", "-Q", "SELECT 1;"))
.Build();

public async Task InitializeAsync() => await _dbContainer.StartAsync();

Expand Down

0 comments on commit 3591d04

Please sign in to comment.