Documentation
¶
Overview ¶
Package testdb gives each test its own PostgreSQL database, built from the DDL the test passes and dropped when the test ends.
TEST_DATABASE_URL points at the server (any database on it). Tests skip when it is unreachable and TEST_DATABASE_REQUIRED is unset, so a plain `go test ./...` without Postgres still runs the rest; CI sets it.
Index ¶
Constants ¶
View Source
const DefaultURL = "postgres://searchnzb:dev@localhost:55432/postgres"
DefaultURL is the development server the tests use without TEST_DATABASE_URL.
Variables ¶
This section is empty.
Functions ¶
func WithDatabase ¶
WithDatabase is url with its database replaced by name.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.