testhelpers

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2018 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertContains

func AssertContains(t *testing.T, actual, expected string)

func AssertDirContainsFileWithContents

func AssertDirContainsFileWithContents(t *testing.T, dir string, file string, expected string)

func AssertEq

func AssertEq(t *testing.T, actual, expected interface{})

Assert deep equality (and provide useful difference as a test failure)

func AssertError

func AssertError(t *testing.T, actual error, expected string)

func AssertMatch

func AssertMatch(t *testing.T, actual string, expected *regexp.Regexp)

func AssertNil

func AssertNil(t *testing.T, actual interface{})

func AssertNotEq

func AssertNotEq(t *testing.T, actual, expected interface{})

func AssertNotNil

func AssertNotNil(t *testing.T, actual interface{})

func AssertSameInstance

func AssertSameInstance(t *testing.T, actual, expected interface{})

Assert the simplistic pointer (or literal value) equality

func AssertSliceContains

func AssertSliceContains(t *testing.T, slice []string, value string)

func CleanDefaultImages

func CleanDefaultImages(t *testing.T, registryPort string)

func ConfigurePackHome

func ConfigurePackHome(t *testing.T, packHome, registryPort string)

func CopySingleFileFromContainer

func CopySingleFileFromContainer(dockerCli *docker.Client, ctrID, path string) (string, error)

func CopySingleFileFromImage

func CopySingleFileFromImage(dockerCli *docker.Client, repoName, path string) (string, error)

func CopyWorkspaceToDocker

func CopyWorkspaceToDocker(t *testing.T, srcPath, destVolume string)

func CreateImageOnLocal

func CreateImageOnLocal(t *testing.T, dockerCli *docker.Client, repoName, dockerFile string)

func CreateImageOnRemote

func CreateImageOnRemote(t *testing.T, dockerCli *docker.Client, repoName, dockerFile string) string

func DefaultBuildImage

func DefaultBuildImage(t *testing.T, registryPort string) string

func DefaultBuilderImage

func DefaultBuilderImage(t *testing.T, registryPort string) string

func DefaultRunImage

func DefaultRunImage(t *testing.T, registryPort string) string

func DockerRmi

func DockerRmi(dockerCli *docker.Client, repoNames ...string) error

func Eventually

func Eventually(t *testing.T, test func() bool, every time.Duration, timeout time.Duration)

func HttpGet

func HttpGet(t *testing.T, url string) string

func HttpGetE

func HttpGetE(url string) (string, error)

func ImageID

func ImageID(t *testing.T, repoName string) string

func RandString

func RandString(n int) string

func ReadFromDocker

func ReadFromDocker(t *testing.T, volume, path string) string

func Run

func Run(t *testing.T, cmd *exec.Cmd) string

func RunE

func RunE(cmd *exec.Cmd) (string, error)

func RunRegistry

func RunRegistry(t *testing.T, seedRegistry bool) (localPort string)

func StopRegistry

func StopRegistry(t *testing.T)

Types

This section is empty.

Jump to

Keyboard shortcuts

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