empiretest

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2016 License: BSD-2-Clause Imports: 17 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 ExtractProcfile added in v0.10.0

func ExtractProcfile(pf procfile.Procfile) empire.ProcfileExtractor

Returns a function that can be used as a Procfile extract for Empire. It writes a fake Docker pull to w, and extracts the given Procfile in yaml format.

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 Run

func Run(m *testing.M)

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

Types

type Server added in v0.11.0

type Server struct {
	*empire.Empire
	*httptest.Server
}

func NewServer

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

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

func NewTestServer added in v0.10.1

func NewTestServer(t testing.TB, e *empire.Empire, opts server.Options) *Server

NewTestServer returns a new httptest.Server for testing empire's http server.

func (*Server) Close added in v0.11.0

func (s *Server) Close()

Directories

Path Synopsis
Package cli provides test helpers for testing the emp CLI against an Empire environment.
Package cli provides test helpers for testing the emp CLI against an Empire environment.

Jump to

Keyboard shortcuts

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