testutil

package
v1.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PostgresTestDSN = "postgres://testuser:testpassword@localhost:5433/testdb?sslmode=disable"
	MySQLTestDSN    = "testuser:testpassword@tcp(localhost:3307)/testdb?parseTime=true"
)

Variables

This section is empty.

Functions

func CleanupMySQLDB

func CleanupMySQLDB(t *testing.T, db *sql.DB)

CleanupMySQLDB truncates all tables in the MySQL database

func CleanupPostgresDB

func CleanupPostgresDB(t *testing.T, db *sql.DB)

CleanupPostgresDB truncates all tables in the PostgreSQL database

func SetupMySQLDB

func SetupMySQLDB(t *testing.T) *sql.DB

SetupMySQLDB creates a new MySQL database connection and runs migrations

func SetupPostgresDB

func SetupPostgresDB(t *testing.T) *sql.DB

SetupPostgresDB creates a new PostgreSQL database connection and runs migrations

func TeardownDB

func TeardownDB(t *testing.T, db *sql.DB)

TeardownDB closes the database connection and cleans up

Types

This section is empty.

Jump to

Keyboard shortcuts

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