Documentation
¶
Index ¶
- func CleanupPostgresTestData(t *testing.T, db *gorm.DB)
- func CleanupSharedMySQL()
- func CleanupSharedPostgres()
- func CleanupTestData(t *testing.T, db *gorm.DB)
- func GetSharedMySQLDB(t *testing.T) (*gorm.DB, func())
- func GetSharedMySQLDSN(t *testing.T) string
- func GetSharedPostgresDB(t *testing.T) (*gorm.DB, func())
- func GetSharedPostgresDSN(t *testing.T) string
- func SetupMySQLWithMigrations(t *testing.T, spec *datastore.Spec) (*gorm.DB, func())
- func SetupPostgresWithMigrations(t *testing.T, spec *datastore.Spec) (*gorm.DB, func())
- func SetupSharedMySQL() error
- func SetupSharedPostgres() error
- func TestMainHelper(m *testing.M) int
- func TestMainPostgresHelper(m *testing.M) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupPostgresTestData ¶
CleanupPostgresTestData cleans up test data from the shared PostgreSQL database
func CleanupSharedMySQL ¶
func CleanupSharedMySQL()
CleanupSharedMySQL terminates the shared MySQL container
func CleanupSharedPostgres ¶
func CleanupSharedPostgres()
CleanupSharedPostgres terminates the shared PostgreSQL container
func CleanupTestData ¶
CleanupTestData cleans up test data from the shared database
func GetSharedMySQLDB ¶
GetSharedMySQLDB returns a connection to the shared MySQL database
func GetSharedMySQLDSN ¶
GetSharedMySQLDSN returns the DSN for the shared MySQL database
func GetSharedPostgresDB ¶
GetSharedPostgresDB returns a connection to the shared PostgreSQL database
func GetSharedPostgresDSN ¶
GetSharedPostgresDSN returns the DSN for the shared PostgreSQL database
func SetupMySQLWithMigrations ¶
SetupMySQLWithMigrations returns a migrated MySQL database connection
func SetupPostgresWithMigrations ¶
SetupPostgresWithMigrations returns a migrated PostgreSQL database connection
func SetupSharedMySQL ¶
func SetupSharedMySQL() error
SetupSharedMySQL initializes a shared MySQL container for all tests
func SetupSharedPostgres ¶
func SetupSharedPostgres() error
SetupSharedPostgres initializes a shared PostgreSQL container for all tests
func TestMainHelper ¶
TestMainHelper provides a helper function for package-level test setup
func TestMainPostgresHelper ¶
TestMainPostgresHelper provides a helper function for package-level test setup with PostgreSQL
Types ¶
This section is empty.