Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
<PackageReference Include="Serilog.Sinks.XUnit" Version="3.0.3" />
<PackageReference Include="Testcontainers" Version="2.1.0" />
<PackageReference Include="Testcontainers" Version="2.2.0-beta.3311860540" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait for next stable release

<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
</ItemGroup>
Expand Down
5 changes: 2 additions & 3 deletions tests/common/IntegrationTestFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ public class IntegrationTestFactory<TProgram, TDbContext> : WebApplicationFactor
public IntegrationTestFactory()
{
_container = new TestcontainersBuilder<MySqlTestcontainer>()
.WithDatabase(new MySqlTestcontainerConfiguration { Database = "datadonation", Username = "test123", Password = "example"})
.WithEnvironment("MYSQL_ROOT_PASSWORD", "example")
.WithDatabase(new MySqlTestcontainerConfiguration { Database = "datadonation", Username = "root", Password = "example" })
.WithImage("mysql:8.0.29")
.WithCleanUp(true)
.Build();
Expand All @@ -40,7 +39,7 @@ protected override void ConfigureWebHost(IWebHostBuilder builder)
}
}

var connectionString = _container.ConnectionString.Replace("test123", "root") + ";OldGuids=true" ;
var connectionString = _container.ConnectionString + ";OldGuids=true";

var serverVersion =
new MySqlServerVersion(ServerVersion.AutoDetect(connectionString));
Expand Down