Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHostPort ¶
GetHostPort returns the container's host and port.
func MustStartPostgresContainer ¶
func MustStartPostgresContainer()
MustStartPostgresContainer starts the test container and initializes testDB. Call from TestMain before m.Run().
func TeardownPostgresContainer ¶
func TeardownPostgresContainer()
TeardownPostgresContainer stops the container. Call from TestMain after m.Run().
Types ¶
type TestDB ¶
TestDB holds a test database connection.
func SetupTestDB ¶
SetupTestDB returns the shared test database, cleaning tables for isolation.
func (*TestDB) CleanTables ¶
CleanTables truncates all test tables.
Click to show internal directories.
Click to hide internal directories.