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 ¶ added in v0.3.2
CleanupPostgresTestData cleans up test data from the shared PostgreSQL database
func CleanupSharedMySQL ¶ added in v0.3.0
func CleanupSharedMySQL()
CleanupSharedMySQL terminates the shared MySQL container
func CleanupSharedPostgres ¶ added in v0.3.2
func CleanupSharedPostgres()
CleanupSharedPostgres terminates the shared PostgreSQL container
func CleanupTestData ¶ added in v0.3.0
CleanupTestData cleans up test data from the shared database
func GetSharedMySQLDB ¶ added in v0.3.0
GetSharedMySQLDB returns a connection to the shared MySQL database
func GetSharedMySQLDSN ¶ added in v0.3.0
GetSharedMySQLDSN returns the DSN for the shared MySQL database
func GetSharedPostgresDB ¶ added in v0.3.2
GetSharedPostgresDB returns a connection to the shared PostgreSQL database
func GetSharedPostgresDSN ¶ added in v0.3.2
GetSharedPostgresDSN returns the DSN for the shared PostgreSQL database
func SetupMySQLWithMigrations ¶ added in v0.3.0
SetupMySQLWithMigrations returns a migrated MySQL database connection
func SetupPostgresWithMigrations ¶ added in v0.3.2
SetupPostgresWithMigrations returns a migrated PostgreSQL database connection
func SetupSharedMySQL ¶ added in v0.3.0
func SetupSharedMySQL() error
SetupSharedMySQL initializes a shared MySQL container for all tests
func SetupSharedPostgres ¶ added in v0.3.2
func SetupSharedPostgres() error
SetupSharedPostgres initializes a shared PostgreSQL container for all tests
func TestMainHelper ¶ added in v0.3.0
TestMainHelper provides a helper function for package-level test setup
func TestMainPostgresHelper ¶ added in v0.3.2
TestMainPostgresHelper provides a helper function for package-level test setup with PostgreSQL
Types ¶
This section is empty.