testing

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToPtr

func ToPtr[T any](v T) *T

Types

type CockroachContainer

type CockroachContainer struct {
	testcontainers.Container
	URI string
}

func SetupCockroach

func SetupCockroach(t *testing.T) *CockroachContainer

type MySQLContainer added in v1.2.0

type MySQLContainer struct {
	*mysql.MySQLContainer
	ConnectionString string
}

func SetupMySQLContainer added in v1.2.0

func SetupMySQLContainer(ctx context.Context) (*MySQLContainer, error)

func (*MySQLContainer) GetDB added in v1.2.0

func (c *MySQLContainer) GetDB() (*sql.DB, error)

func (*MySQLContainer) Teardown added in v1.2.0

func (c *MySQLContainer) Teardown(ctx context.Context) error

type PostgresContainer

type PostgresContainer struct {
	testcontainers.Container
	URI      string
	Username string
	Password string
	Database string
	Port     string
}

func SetupPostgres

func SetupPostgres(t *testing.T) *PostgresContainer

type SQLiteContainer added in v1.1.0

type SQLiteContainer struct {
	testcontainers.Container
	URI string
}

func SetupSQLite added in v1.1.0

func SetupSQLite(t *testing.T) *SQLiteContainer

Jump to

Keyboard shortcuts

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