dockertest

package
v0.0.50 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2019 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToTestMySQL

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

ConnectToTestMySQL connects to a MySQL database.

func ConnectToTestPostgreSQL

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

ConnectToTestPostgreSQL connects to a PostgreSQL database.

func KillAllTestDatabases

func KillAllTestDatabases()

KillAllTestDatabases deletes all test databases.

func Parallel

func Parallel(fs []func())

Parallel runs tasks in parallel.

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