Revert component tests database configuration from SQL Server to PostgreSQL.

This commit is contained in:
Sipke Schoorstra 2025-12-11 09:54:16 +01:00
parent 1107b48200
commit 183934c1af
No known key found for this signature in database
GPG key ID: 5C10502B28A4268F
2 changed files with 12 additions and 24 deletions

View file

@ -6,23 +6,11 @@ namespace Elsa.Workflows.ComponentTests.Fixtures;
public class Infrastructure : IAsyncLifetime
{
// public readonly PostgreSqlContainer DbContainer = new PostgreSqlBuilder()
// .WithImage("postgres:16-alpine")
// .WithDatabase("elsa")
// .WithUsername("postgres")
// .WithPassword("postgres")
// .WithCommand(
// "-c", "max_connections=100",
// "-c", "shared_buffers=128MB",
// "-c", "work_mem=4MB",
// "-c", "effective_cache_size=256MB"
// )
// .Build();
public readonly PostgreSqlContainer DbContainer = new PostgreSqlBuilder().Build();
public readonly MsSqlContainer DbContainer = new MsSqlBuilder()
.WithImage("mcr.microsoft.com/mssql/server:2022-latest")
.WithPassword("!Elsa2025@")
.Build();
// public readonly MsSqlContainer DbContainer = new MsSqlBuilder()
// .WithImage("mcr.microsoft.com/mssql/server:2022-latest")
// .Build();
public readonly RabbitMqContainer RabbitMqContainer = new RabbitMqBuilder()
.WithImage("rabbitmq:4-management")

View file

@ -80,15 +80,15 @@ public class WorkflowServer(Infrastructure infrastructure, string url) : WebAppl
});
elsa.UseIdentity(identity => identity.UseEntityFrameworkCore(ef =>
{
//ef.UsePostgreSql(dbConnectionString);
ef.UseSqlServer(dbConnectionString);
ef.UsePostgreSql(dbConnectionString);
//ef.UseSqlServer(dbConnectionString);
}));
elsa.UseWorkflowManagement(management =>
{
management.UseEntityFrameworkCore(ef =>
{
//ef.UsePostgreSql(dbConnectionString);
ef.UseSqlServer(dbConnectionString);
ef.UsePostgreSql(dbConnectionString);
//ef.UseSqlServer(dbConnectionString);
});
management.UseCache();
});
@ -96,8 +96,8 @@ public class WorkflowServer(Infrastructure infrastructure, string url) : WebAppl
{
runtime.UseEntityFrameworkCore(ef =>
{
//ef.UsePostgreSql(dbConnectionString);
ef.UseSqlServer(dbConnectionString);
ef.UsePostgreSql(dbConnectionString);
//ef.UseSqlServer(dbConnectionString);
});
runtime.UseCache();
runtime.UseDistributedRuntime();
@ -114,8 +114,8 @@ public class WorkflowServer(Infrastructure infrastructure, string url) : WebAppl
{
alterations.UseEntityFrameworkCore(ef =>
{
//ef.UsePostgreSql(dbConnectionString);
ef.UseSqlServer(dbConnectionString);
ef.UsePostgreSql(dbConnectionString);
//ef.UseSqlServer(dbConnectionString);
});
});
elsa.UseHttp(http =>