Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupTestSchema ¶
CleanupTestSchema removes test tables
func GetRealDatabaseConfig ¶
GetRealDatabaseConfig attempts to get database config from environment variables This is a helper that tests can use directly without creating a TestDatabase
Types ¶
type TestDatabase ¶
TestDatabase represents a test database instance
func NewTestDatabase ¶
NewTestDatabase creates a new PostgreSQL test database Uses environment variables or starts a Docker container
func (*TestDatabase) CleanupAfterTest ¶
func (td *TestDatabase) CleanupAfterTest(ctx context.Context, t *testing.T)
CleanupAfterTest provides a cleanup function for use with t.Cleanup()
func (*TestDatabase) GetConfig ¶
func (td *TestDatabase) GetConfig() *config.DBConfig
GetConfig returns the database configuration
Click to show internal directories.
Click to hide internal directories.