Documentation
¶
Index ¶
Constants ¶
View Source
const (
EnvTestPostgres = "TEST_POSTGRES"
)
ENV constants for testing
Variables ¶
This section is empty.
Functions ¶
func GuardPostgresTests ¶
Types ¶
type PostgresContainer ¶
type PostgresContainer struct {
// contains filtered or unexported fields
}
PostgresContainer represents a test docker container with Postgres database.
func NewPostgresContainer ¶
func NewPostgresContainer(t *testing.T) *PostgresContainer
NewPostgresContainer start a new PG container Read more: https://golang.testcontainers.org/modules/postgres/ Automatically cleans up the container after the test.
func (*PostgresContainer) CreateDB ¶
func (p *PostgresContainer) CreateDB(database string)
func (*PostgresContainer) URL ¶
func (p *PostgresContainer) URL(database string) string
Click to show internal directories.
Click to hide internal directories.