elsa-core/test/component/Elsa.AzureServiceBus.ComponentTests/Fixtures/Infrastructure.cs
Sipke Schoorstra cb6a7dfc11 Update RabbitMQ image to version 4-management
Upgraded RabbitMQ from version 3-management to 4-management across tests and the Docker setup. This ensures compatibility with the latest features and improvements in RabbitMQ while maintaining consistency across environments.
2024-12-14 11:44:52 +01:00

32 lines
849 B
C#

using Testcontainers.PostgreSql;
using Testcontainers.RabbitMq;
namespace Elsa.AzureServiceBus.ComponentTests;
public class Infrastructure : IAsyncLifetime
{
public readonly PostgreSqlContainer DbContainer = new PostgreSqlBuilder()
.WithImage("postgres:latest")
.WithDatabase("elsa")
.WithUsername("postgres")
.WithPassword("postgres")
.Build();
public readonly RabbitMqContainer RabbitMqContainer = new RabbitMqBuilder()
.WithImage("rabbitmq:4-management")
.Build();
public Task InitializeAsync()
{
return Task.WhenAll(
DbContainer.StartAsync(),
RabbitMqContainer.StartAsync());
}
public Task DisposeAsync()
{
return Task.WhenAll(
DbContainer.StopAsync(),
RabbitMqContainer.StopAsync());
}
}