Documentation ¶
Overview ¶
withdb is a simplified way of creating test databases, used to test the internal packages that pgtestdb depends on.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithDB ¶
WithDB is a helper for writing postgres-backed tests. It will: - connect to a local postgres server (see docker-compose.yml) - create a new, empty test database with a unique name - open a connection to that test database - run the `cb` function - remove the test database
This is designed to be an internal helper for testing other database-related packages, and should not be relied upon externally.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.