testutils

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupPostgresTestData added in v0.3.2

func CleanupPostgresTestData(t *testing.T, db *gorm.DB)

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

func CleanupTestData(t *testing.T, db *gorm.DB)

CleanupTestData cleans up test data from the shared database

func GetSharedMySQLDB added in v0.3.0

func GetSharedMySQLDB(t *testing.T) (*gorm.DB, func())

GetSharedMySQLDB returns a connection to the shared MySQL database

func GetSharedMySQLDSN added in v0.3.0

func GetSharedMySQLDSN(t *testing.T) string

GetSharedMySQLDSN returns the DSN for the shared MySQL database

func GetSharedPostgresDB added in v0.3.2

func GetSharedPostgresDB(t *testing.T) (*gorm.DB, func())

GetSharedPostgresDB returns a connection to the shared PostgreSQL database

func GetSharedPostgresDSN added in v0.3.2

func GetSharedPostgresDSN(t *testing.T) string

GetSharedPostgresDSN returns the DSN for the shared PostgreSQL database

func SetupMySQLWithMigrations added in v0.3.0

func SetupMySQLWithMigrations(t *testing.T, spec *datastore.Spec) (*gorm.DB, func())

SetupMySQLWithMigrations returns a migrated MySQL database connection

func SetupPostgresWithMigrations added in v0.3.2

func SetupPostgresWithMigrations(t *testing.T, spec *datastore.Spec) (*gorm.DB, func())

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

func TestMainHelper(m *testing.M) int

TestMainHelper provides a helper function for package-level test setup

func TestMainPostgresHelper added in v0.3.2

func TestMainPostgresHelper(m *testing.M) int

TestMainPostgresHelper provides a helper function for package-level test setup with PostgreSQL

Types

This section is empty.

Jump to

Keyboard shortcuts

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