testutil

package
v0.0.0-...-6843a2d Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TestDatabaseName is the name of the test database.
	TestDatabaseName = "webapitest"
)

Variables

This section is empty.

Functions

func Connection

func Connection(unique string) *mysql.Connection

Connection returns the test connection.

func SetEnv

func SetEnv(unique string)

SetEnv will set the environment variables.

func SetupDatabase

func SetupDatabase() (*sqlx.DB, string)

SetupDatabase will create the test database and set the environment variables.

func TeardownDatabase

func TeardownDatabase(unique string)

TeardownDatabase will destroy the test database and unset the environment variables.

func UnsetEnv

func UnsetEnv(unique string)

UnsetEnv will unset the environment variables.

Types

This section is empty.

Jump to

Keyboard shortcuts

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