Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupTestDatabase ¶
func CleanupTestDatabase()
CleanupTestDatabase closes the test database connection. This could be called in a TestMain m.Run() defer if using a global testDB.
func SetupTestDatabase ¶
SetupTestDatabase initializes a test database connection and runs migrations. It returns the database connection and a cleanup function. If TEST_POSTGRES_DSN is not set, it uses a default local DSN.
func SetupTestStores ¶
func SetupTestStores(t *testing.T) (*sqlx.DB, store.CampaignStore, store.AuditLogStore, store.PersonaStore, store.CampaignJobStore, store.KeywordStore, store.ProxyStore, func())
SetupTestStores creates all the necessary stores for testing
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.