Versions in this module Expand all Collapse all v0 v0.1.0 Jan 16, 2025 Changes in this version + func ApplyMigrations(t *testing.T, cfg *config.PostgresConfig) + func CloneDB(t *testing.T, tp *TestPostgresContainer, pool *pgxpool.Pool) *pgxpool.Pool + func CreateTestSchema(ctx context.Context, t *testing.T) (schema string) + func DropTestSchema(ctx context.Context, t *testing.T, schema string) + func GetTestConnectionPool(ctx context.Context, t *testing.T, cfg *config.PostgresConfig) *pgxpool.Pool + func NewTestConnectionPool(ctx context.Context, t *testing.T) *pgxpool.Pool + type InstanceConfig struct + DBName string + Host string + Password string + Port int + User string + func (c InstanceConfig) DBConnStr() string + type TestPostgresContainer struct + Cfg InstanceConfig + Container testcontainers.Container + func NewTestPostgresContainer(ctx context.Context, cfg InstanceConfig) (*TestPostgresContainer, error) + func (tp *TestPostgresContainer) Migrate(dir string) error + func (tp *TestPostgresContainer) Pool(ctx context.Context, t *testing.T, cfg *InstanceConfig) *pgxpool.Pool