Documentation
¶
Overview ¶
Package testutil provides testing utilities for database integration tests. Includes helpers for setting up PostgreSQL and MySQL test databases with migrations.
Index ¶
Constants ¶
View Source
const ( PostgresTestDSN = "postgres://testuser:testpassword@localhost:5433/testdb?sslmode=disable" MySQLTestDSN = "testuser:testpassword@tcp(localhost:3307)/testdb?parseTime=true&multiStatements=true" )
Variables ¶
This section is empty.
Functions ¶
func CleanupMySQLDB ¶
CleanupMySQLDB truncates all tables in the MySQL database.
func CleanupPostgresDB ¶
CleanupPostgresDB truncates all tables in the PostgreSQL database.
func SetupMySQLDB ¶
SetupMySQLDB creates a new MySQL database connection and runs migrations.
func SetupPostgresDB ¶
SetupPostgresDB creates a new PostgreSQL database connection and runs migrations.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.