empiretest

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2015 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DatabaseURL is a connection string for the postgres database to use
	// during integration tests.
	DatabaseURL = "postgres://localhost/empire?sslmode=disable"
)

Functions

func NewEmpire

func NewEmpire(t testing.TB) *empire.Empire

NewEmpire returns a new Empire instance suitable for testing. It ensures that the database is clean before returning.

func NewServer

func NewServer(t testing.TB, e *empire.Empire) *httptest.Server

NewServer builds a new empire.Empire instance and returns an httptest.Server running the empire API.

func Run

func Run(m *testing.M)

Run runs testing.M after aquiring a lock against the database.

Types

This section is empty.

Jump to

Keyboard shortcuts

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