Skip to content

Commit 9288833

Browse files
committed
[tests] Workaround sqlserver 2022-latest latest image failing
.. with testcontainers because the path `/opt/mssql-tools/bin/sqlcmd` changed to `/opt/mssql-tools18/bin/sqlcmd`. But this hardcoded path is being used in testcontainers, causing it to fail. testcontainers/testcontainers-dotnet#1220 microsoft/mssql-docker#892
1 parent df935f4 commit 9288833

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/Aspire.Microsoft.Data.SqlClient.Tests/SqlServerContainerFixture.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
using Aspire.Components.Common.Tests;
55
using Aspire.Hosting;
6+
using DotNet.Testcontainers.Builders;
67
using Testcontainers.MsSql;
78
using Xunit;
89

@@ -21,6 +22,7 @@ public async Task InitializeAsync()
2122
{
2223
Container = new MsSqlBuilder()
2324
.WithImage($"{SqlServerContainerImageTags.Registry}/{SqlServerContainerImageTags.Image}:{SqlServerContainerImageTags.Tag}")
25+
.WithWaitStrategy(Wait.ForUnixContainer().UntilCommandIsCompleted("/opt/mssql-tools18/bin/sqlcmd", "-C", "-Q", "SELECT 1;"))
2426
.Build();
2527
await Container.StartAsync();
2628
}

0 commit comments

Comments
 (0)