Documentation
¶
Index ¶
Constants ¶
View Source
const ( TestDBUser = "testuser" TestDBPassword = "testpass" TestDBName = "testdb" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresContainer ¶
type PostgresContainer struct {
Container *postgres.PostgresContainer
Host string
Port int
}
PostgresContainer wraps a testcontainers Postgres instance.
func StartPostgres ¶
func StartPostgres(ctx context.Context, t *testing.T) *PostgresContainer
StartPostgres spins up a Postgres container for integration tests.
func (*PostgresContainer) ConnectionString ¶
func (pc *PostgresContainer) ConnectionString(database string) string
ConnectionString returns a DSN for connecting to the test container.
Click to show internal directories.
Click to hide internal directories.