Documentation
¶
Overview ¶
Package pgtest gives a test its own migrated Postgres database.
Each call creates a database on the server PGTEST_DSN points at, runs the app's migrations into it, and drops it when the test ends. Tests fail rather than skip when the server is unreachable, because a skipped suite reads as a green run; -short is the one way to opt out.
Index ¶
Constants ¶
View Source
const DSNEnv = "PGTEST_DSN"
DSNEnv names the admin connection: any database on the server, as a role that may CREATE DATABASE.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.