Documentation ¶
Index ¶
- func AllLogs(logHandler *memory.Handler) string
- func AssertContains(t *testing.T, slice []string, elements ...string)
- func AssertEq(t *testing.T, actual, expected interface{})
- func AssertError(t *testing.T, actual error, expected string)
- func AssertJSONEq(t *testing.T, expected, actual string)
- func AssertLogEntry(t *testing.T, logHandler *memory.Handler, expected string)
- func AssertMatch(t *testing.T, actual string, expected string)
- func AssertNil(t *testing.T, actual interface{})
- func AssertNoLogEntry(t *testing.T, logHandler *memory.Handler, expected string)
- func AssertNotNil(t *testing.T, actual interface{})
- func AssertPathDoesNotExist(t *testing.T, path string)
- func AssertPathExists(t *testing.T, path string)
- func AssertSameInstance(t *testing.T, actual, expected interface{})
- func AssertStringContains(t *testing.T, str string, expected string)
- func AssertStringDoesNotContain(t *testing.T, str string, expected string)
- func CleanEndings(s string) string
- func ComputeSHA256ForFile(t *testing.T, path string) string
- func CopyFile(t *testing.T, srcFileName, destFileName string)
- func CreateSingleFileTar(path, txt string) (io.Reader, error)
- func DockerBuild(t *testing.T, name, context string, ops ...DockerCmdOp)
- func DockerCli(t *testing.T) dockercli.CommonAPIClient
- func DockerContainerExists(t *testing.T, containerName string) bool
- func DockerCopyOut(t *testing.T, containerName, srcCtrPath, outputDir string) string
- func DockerImageRemove(t *testing.T, name string)
- func DockerRun(t *testing.T, image string, ops ...DockerCmdOp) string
- func DockerRunAndCopy(t *testing.T, containerName, outputDir, outputCtrPath, image string, ...) string
- func DockerSeedRunAndCopy(t *testing.T, ...) string
- func DockerVolumeExists(t *testing.T, volumeName string) bool
- func DockerVolumeRemove(t *testing.T, volume string)
- func Eventually(t *testing.T, test func() bool, every time.Duration, timeout time.Duration)
- func GetUmask(t *testing.T) int
- func HTTPGetE(url string) (string, error)
- func MakeAndCopyLifecycle(t *testing.T, goos, goarch, destDir string, envs ...string)
- func Mkdir(t *testing.T, dirs ...string)
- func Mkfile(t *testing.T, data string, paths ...string)
- func MustReadFile(t *testing.T, path string) []byte
- func PushImage(dockerCli dockercli.CommonAPIClient, ref string, auth string) error
- func RandString(n int) string
- func RandomLayer(t *testing.T, tmpDir string) (path string, sha string, contents []byte)
- func Rdfile(t *testing.T, path string) string
- func RecursiveCopy(t *testing.T, src, dst string)
- func Run(t *testing.T, cmd *exec.Cmd) string
- func RunE(cmd *exec.Cmd) (output string, exitCode int, err error)
- func SeedDockerVolume(t *testing.T, srcPath string) string
- func SkipIf(t *testing.T, expression bool, reason string)
- type DockerCmd
- type DockerCmdOp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertJSONEq ¶
func AssertLogEntry ¶ added in v0.14.1
func AssertNoLogEntry ¶ added in v0.14.1
func AssertNotNil ¶ added in v0.9.0
func AssertPathDoesNotExist ¶
func AssertPathExists ¶
func AssertSameInstance ¶
Assert the simplistic pointer (or literal value) equality
func AssertStringDoesNotContain ¶ added in v0.9.0
func CleanEndings ¶ added in v0.10.0
func DockerBuild ¶ added in v0.9.0
func DockerBuild(t *testing.T, name, context string, ops ...DockerCmdOp)
func DockerContainerExists ¶ added in v0.9.2
func DockerCopyOut ¶ added in v0.12.0
func DockerImageRemove ¶ added in v0.9.0
func DockerRun ¶ added in v0.9.0
func DockerRun(t *testing.T, image string, ops ...DockerCmdOp) string
func DockerRunAndCopy ¶ added in v0.9.0
func DockerRunAndCopy(t *testing.T, containerName, outputDir, outputCtrPath, image string, ops ...DockerCmdOp) string
DockerRunAndCopy runs a container and once stopped, outputCtrPath is copied to outputDir
func DockerSeedRunAndCopy ¶ added in v0.12.0
func DockerSeedRunAndCopy(t *testing.T, containerName, srcDir, srcCtrPath, outputDir, outputCtrPath, image string, ops ...DockerCmdOp) string
DockerSeedRunAndCopy copies srcDir to container's srcCtrPath before container is started. Once stopped, outputCtrPath is copied to outputDir On WCOW, only works when seeding to container directory (not a mounted volume)
func DockerVolumeExists ¶ added in v0.9.2
func DockerVolumeRemove ¶ added in v0.9.0
func Eventually ¶
func MakeAndCopyLifecycle ¶ added in v0.9.0
func PushImage ¶ added in v0.9.0
func PushImage(dockerCli dockercli.CommonAPIClient, ref string, auth string) error
TODO: re-work this function to exec the docker cli, or convert other docker helpers to using the client library.
func RandString ¶
func RandomLayer ¶
func RecursiveCopy ¶
func SeedDockerVolume ¶ added in v0.9.0
SeedDockerVolume only works with Linux daemons as Windows only mounts volumes for started containers
Types ¶
type DockerCmd ¶ added in v0.9.0
type DockerCmd struct {
// contains filtered or unexported fields
}
type DockerCmdOp ¶ added in v0.9.0
type DockerCmdOp func(*DockerCmd)
func WithArgs ¶ added in v0.9.0
func WithArgs(args ...string) DockerCmdOp
func WithBash ¶ added in v0.9.0
func WithBash(args ...string) DockerCmdOp
func WithFlags ¶ added in v0.9.0
func WithFlags(flags ...string) DockerCmdOp
Click to show internal directories.
Click to hide internal directories.