Documentation
¶
Overview ¶
Package pgtest gives tests a real PostgreSQL: one container per test binary, a fresh database per test. Tests skip when no container runtime answers. To use a server of your own instead, set DEVOPUS_TEST_DATABASE_URL to a connection URL with the right to create databases.
The package's TestMain must run the tests with Run so the container goes away after them: func TestMain(m *testing.M) { os.Exit(pgtest.Run(m)) }
Index ¶
Constants ¶
View Source
const Image = "postgres:17-alpine"
Image is the PostgreSQL the tests run against.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.