Documentation
¶
Overview ¶
Package testdb provides shared test helpers for booting a throwaway Postgres container and running migrations.
This package imports `testing`, so it must be imported only from `*_test.go` files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BootPG ¶
BootPG starts a throwaway Postgres 16 container, runs all migrations, and returns a ready-to-use pgx pool + a cleanup func the caller must defer.
func BootPGWithDSN ¶
BootPGWithDSN is like BootPG but returns the DSN instead of a pool. Intended for callers that want to open their own pool (e.g., CLI tests that exercise pgxpool.New from inside the code under test).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.