using Testcontainers.PostgreSql;
using Xunit;
namespace TeamUp.IntegrationTests;
/// A throwaway Postgres 17 + pgvector container, shared across the integration tests.
public sealed class PostgresFixture : IAsyncLifetime
{
private readonly PostgreSqlContainer _container = new PostgreSqlBuilder()
.WithImage("pgvector/pgvector:pg17")
.WithDatabase("teamup")
.WithUsername("teamup")
.WithPassword("teamup")
.Build();
public string ConnectionString => _container.GetConnectionString();
public async ValueTask InitializeAsync() => await _container.StartAsync();
public async ValueTask DisposeAsync() => await _container.DisposeAsync();
}
[CollectionDefinition(Name)]
public sealed class PostgresCollection : ICollectionFixture
{
public const string Name = "postgres";
}