Documentation
¶
Overview ¶
Package testdb connects integration tests to PostgreSQL.
Tests that need a database call Pool. They are skipped when the TASKMILL_TEST_DATABASE_URL environment variable is unset; `make test` sets it to the database that `make db` starts. Each test gets its own schema, so tests can run in parallel and leave nothing behind.
Index ¶
Constants ¶
const EnvURL = "TASKMILL_TEST_DATABASE_URL"
EnvURL names the environment variable that holds the test database URL.
Variables ¶
This section is empty.
Functions ¶
func Pool ¶
Pool returns a pool of up to 8 connections to the test database, closed when the test ends.
func PoolSize ¶
PoolSize is Pool with a given number of connections, for tests that run many operations at once.
Types ¶
This section is empty.