integrationtest

package
v0.0.0-...-0e8dd81 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestDataPath string

TestDataPath contains the full path to the 'testdata' directory This variable is guaranteed to be set at runtime; if the directory does not exist panic() is called

Functions

func LoadElasticSnapshot

func LoadElasticSnapshot(client *http.Client, url string, location string) (err error)

LoadElasticSnapshot loads an elastic snapshot

func LockTests

func LockTests()

LockTests prevents any other processes from running tests at the same time

func Main

func Main(m *testing.M, servicefile string, init func(client *http.Client) error, urls ...string)

Main is the entry point for an integration test service and urls are passed directly to StartDockerService and StopDockerService

func MarkSkippable

func MarkSkippable(t *testing.T) bool

MarkSkippable marks t as containing a skippable integration test returns true if the test has been skipped

func StartDockerService

func StartDockerService(service string, urls ...string) (client *http.Client, err error)

StartDockerService starts docker-compose configured services from the given servicefile and then blocks until a url returns http status code 200

func StopDockerService

func StopDockerService(servicefile string) (err error)

StopDockerService gracefully stops and removes the docker-compose configured services from servicefile including all volumes

func TestJSONAsset

func TestJSONAsset(t *testing.T, name string, res interface{}, filename string) bool

TestJSONAsset compares a result with a json file

func UnLockTests

func UnLockTests()

UnLockTests reverses a previous Locktests call

Types

This section is empty.

Jump to

Keyboard shortcuts

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