Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisPav committed Oct 14, 2024
1 parent 6d1e2c1 commit 8e5fd36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions tests/Ooze.Typed.Tests.MySql/MySqlFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Ooze.Typed.Tests.MySql;

public class MySqlFixture : IAsyncLifetime
{
private readonly MariaDbContainer _sqlServerContainer = new MariaDbBuilder()
private readonly MariaDbContainer _mariaDbContainer = new MariaDbBuilder()
.WithImage("mariadb:10.9")
.WithCleanUp(true)
.Build();
Expand All @@ -32,7 +32,7 @@ private static IServiceCollection CreateServiceCollection<TProvider>(bool enable

public MySqlContext CreateContext()
{
var correctConnectionString = _sqlServerContainer.GetConnectionString();
var correctConnectionString = _mariaDbContainer.GetConnectionString();
var serverVersion = ServerVersion.Create(new Version("10.9"), ServerType.MariaDb);
var sqlServerOptions = new DbContextOptionsBuilder()
.UseMySql(correctConnectionString, serverVersion);
Expand All @@ -41,7 +41,7 @@ public MySqlContext CreateContext()

public async Task InitializeAsync()
{
await _sqlServerContainer.StartAsync()
await _mariaDbContainer.StartAsync()
.ConfigureAwait(false);
await using var context = CreateContext();
await context.Database.EnsureCreatedAsync();
Expand All @@ -50,7 +50,7 @@ await _sqlServerContainer.StartAsync()

public async Task DisposeAsync()
{
await _sqlServerContainer
await _mariaDbContainer
.DisposeAsync()
.ConfigureAwait(false);
}
Expand Down
8 changes: 4 additions & 4 deletions tests/Ooze.Typed.Tests.Npgsql/NpgsqlFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Ooze.Typed.Tests.Npgsql;

public class NpgsqlFixture : IAsyncLifetime
{
private readonly PostgreSqlContainer _sqlServerContainer = new PostgreSqlBuilder()
private readonly PostgreSqlContainer _postgreContainer = new PostgreSqlBuilder()
.WithImage("postgres:15.1")
.WithPortBinding(5432, true)
.WithCleanUp(true)
Expand All @@ -33,15 +33,15 @@ private static IServiceCollection CreateServiceCollection<TProvider>(bool enable

public NpgsqlContext CreateContext()
{
var correctConnectionString = _sqlServerContainer.GetConnectionString();
var correctConnectionString = _postgreContainer.GetConnectionString();
var sqlServerOptions = new DbContextOptionsBuilder()
.UseNpgsql(correctConnectionString);
return new NpgsqlContext(sqlServerOptions.Options);
}

public async Task InitializeAsync()
{
await _sqlServerContainer.StartAsync()
await _postgreContainer.StartAsync()
.ConfigureAwait(false);
await using var context = CreateContext();
await context.Database.EnsureCreatedAsync();
Expand All @@ -51,7 +51,7 @@ await _sqlServerContainer.StartAsync()

public async Task DisposeAsync()
{
await _sqlServerContainer
await _postgreContainer
.DisposeAsync()
.ConfigureAwait(false);
}
Expand Down

0 comments on commit 8e5fd36

Please sign in to comment.