Documentation
¶
Overview ¶
Package testdb gives integration tests a Postgres database of their own.
Each test gets a fresh schema, so tests run in parallel and leave nothing behind, unless the test binary is killed. The database comes from HOPPER_TEST_DATABASE_URL; without it, integration tests are skipped.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Database ¶ added in v0.8.0
Database creates a database for this test, with the CREATE DATABASE options given, and returns its URL. It is dropped when the test ends.
func EmptyPool ¶
EmptyPool is like Pool but leaves the schema empty, for migration tests. maxConns of 0 uses the pgxpool default.
func Pool ¶
Pool returns a pool whose search_path is a schema created for this test, with hopper's schema installed. The schema is dropped when the test ends.
Types ¶
This section is empty.