dockertest

package
v0.0.238 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToTestCockroachDB added in v0.0.57

func ConnectToTestCockroachDB() (*sqlx.DB, error)

ConnectToTestCockroachDB connects to a CockroachDB database.

func ConnectToTestCockroachDBPop added in v0.0.113

func ConnectToTestCockroachDBPop(t testing.TB) *pop.Connection

func ConnectToTestMySQL

func ConnectToTestMySQL() (*sqlx.DB, error)

ConnectToTestMySQL connects to a MySQL database.

func ConnectToTestMySQLPop added in v0.0.113

func ConnectToTestMySQLPop(t testing.TB) *pop.Connection

func ConnectToTestPostgreSQL

func ConnectToTestPostgreSQL() (*sqlx.DB, error)

ConnectToTestPostgreSQL connects to a PostgreSQL database.

func ConnectToTestPostgreSQLPop added in v0.0.113

func ConnectToTestPostgreSQLPop(t testing.TB) *pop.Connection

func DumpSchema added in v0.0.179

func DumpSchema(ctx context.Context, t *testing.T, db string) string

func KillAllTestDatabases

func KillAllTestDatabases()

KillAllTestDatabases deletes all test databases.

func Parallel

func Parallel(fs []func())

Parallel runs tasks in parallel.

func RunCockroachDB added in v0.0.131

func RunCockroachDB() (string, error)

RunCockroachDB runs a CockroachDB database and returns the URL to it.

func RunCockroachDBWithVersion added in v0.0.187

func RunCockroachDBWithVersion(version string) (string, error)

RunCockroachDB runs a CockroachDB database and returns the URL to it.

func RunMySQL added in v0.0.131

func RunMySQL() (string, error)

RunMySQL runs a RunMySQL database and returns the URL to it.

func RunPostgreSQL added in v0.0.131

func RunPostgreSQL() (string, error)

RunPostgreSQL runs a PostgreSQL database and returns the URL to it.

func RunTestCockroachDB added in v0.0.84

func RunTestCockroachDB(t testing.TB) string

RunTestCockroachDB runs a CockroachDB database and returns the URL to it.

func RunTestCockroachDBWithVersion added in v0.0.187

func RunTestCockroachDBWithVersion(t testing.TB, version string) string

RunTestCockroachDB runs a CockroachDB database and returns the URL to it.

func RunTestMySQL added in v0.0.84

func RunTestMySQL(t testing.TB) string

RunTestMySQL runs a MySQL database and returns the URL to it.

func RunTestPostgreSQL added in v0.0.84

func RunTestPostgreSQL(t testing.TB) string

RunTestPostgreSQL runs a PostgreSQL database and returns the URL to it.

func StripDump added in v0.0.179

func StripDump(d string) string

Types

type OnExit

type OnExit struct {
	sync.Mutex
	// contains filtered or unexported fields
}

OnExit helps with cleaning up docker test.

func NewOnExit

func NewOnExit() *OnExit

NewOnExit create a new OnExit instance.

func Register

func Register() *OnExit

Register sets up OnExit.

func (*OnExit) Add

func (at *OnExit) Add(f func())

Add adds a task that is executed on SIGINT, SIGKILL, SIGTERM.

func (*OnExit) Exit

func (at *OnExit) Exit(status int)

Exit wraps os.Exit

Jump to

Keyboard shortcuts

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