testutils

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2018 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNomadClient

func NewNomadClient() (*nomad.Client, error)

NewNomadClient creates and returns a new Nomad client used for testing.

TODO(justinwr): configure an HTTP client we can use to stub out requests to Nomad for unit testing

Types

type TestDB

type TestDB struct {
	Conn *pgx.ConnPool
}

func NewTestDB

func NewTestDB() (*TestDB, error)

NewTestDB creates a new object which is used to act upon the database within tests.

func (*TestDB) Clear

func (db *TestDB) Clear(t *testing.T)

Clear clears out all active tables used during automated testing.

TODO(justinwr): make this a loop over the tables instead

Jump to

Keyboard shortcuts

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