testutil

package
v0.0.0-...-7f6939c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 12 Imported by: 0

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

func SetupTestDatabase(t *testing.T) (*sqlx.DB, func())

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

SetupTestStores creates all the necessary stores for testing

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL