Documentation
¶
Overview ¶
Package pgtest creates isolated Postgres schemas for tests.
The Postgres behind these tests is the long-lived one from docker-compose, so anything created here and then abandoned stays there until someone drops it by hand. Each resource is handed to t.Cleanup as soon as it exists, which releases it in reverse order and runs even for the t.Fatalf calls below.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostgresSchema ¶
NewPostgresSchema opens a connection with search_path set to a randomly named, new schema and loads all sqlFiles.
Types ¶
type Option ¶
type Option func(config *pgx.ConnConfig)
Click to show internal directories.
Click to hide internal directories.