testutils

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2015 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateMeAString

func GenerateMeAString(seed, size int64) string

GenerateMeAString generates a pseudo-randomized string of the provided size, with the

func GetRandomUpstreams added in v0.1.2

func GetRandomUpstreams(minCount, maxCount int) []*types.UpstreamAddress

GetRandomUpstreams returns a slice with a random number of upstreams

func GetTestFolder

func GetTestFolder(t testing.TB) (string, func())

GetTestFolder creates and returns a random test folder and a cleanup function. If the folder could not be created or removed afterwords, the test fails fatally.

func GetUpstream added in v0.1.2

func GetUpstream(i int) *types.UpstreamAddress

GetUpstream returns a fully configured upstream address

func GetUpstreams added in v0.1.2

func GetUpstreams(from, to int) []*types.UpstreamAddress

GetUpstreams returns a fully configured slice of sequential upstream address

func ShouldntFail

func ShouldntFail(t testing.TB, errors ...error)

ShouldntFail checks if any of the supplied parameters are non-nil errors and it fatally fails the test if they are.

Types

This section is empty.

Jump to

Keyboard shortcuts

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