Skip to content

Commit

Permalink
[tests] Workaround sqlserver 2022-latest latest image failing
Browse files Browse the repository at this point in the history
.. 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
  • Loading branch information
radical committed Jul 24, 2024
1 parent df935f4 commit 9288833
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using Aspire.Components.Common.Tests;
using Aspire.Hosting;
using DotNet.Testcontainers.Builders;
using Testcontainers.MsSql;
using Xunit;

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

0 comments on commit 9288833

Please sign in to comment.