integration

package
v1.10.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanCleanup added in v1.5.0

func CanCleanup() bool

CanCleanup returns if cleanup is allowed

func Cleanup added in v1.4.0

func Cleanup(t *testing.T, profile string, cancel context.CancelFunc)

Cleanup cleans up after a test run

func CleanupWithLogs added in v1.4.0

func CleanupWithLogs(t *testing.T, profile string, cancel context.CancelFunc)

CleanupWithLogs cleans up after a test run, fetching logs and deleting the profile

func DockerDriver added in v1.10.0

func DockerDriver() bool

DockerDriver returns whether or not this test is using the docker or podman driver

func HyperVDriver added in v1.4.0

func HyperVDriver() bool

HyperVDriver returns whether or not this test is using the Hyper-V driver

func KicDriver added in v1.9.0

func KicDriver() bool

KicDriver returns whether or not this test is using the docker or podman driver

func MaybeParallel added in v1.4.0

func MaybeParallel(t *testing.T)

MaybeParallel sets that the test should run in parallel

func Minutes added in v1.8.0

func Minutes(n int) time.Duration

Minutes will return timeout in minutes based on how slow the machine is

func NeedsPortForward added in v1.9.1

func NeedsPortForward() bool

NeedsPortForward returns access to endpoints with this driver needs port forwarding (Docker on non-Linux platforms requires ports to be forwarded to 127.0.0.1)

func NoneDriver added in v1.4.0

func NoneDriver() bool

NoneDriver returns whether or not this test is using the none driver

func PodWait added in v1.4.0

func PodWait(ctx context.Context, t *testing.T, profile string, ns string, selector string, timeout time.Duration) ([]string, error)

PodWait waits for pods to achieve a running state.

func PodmanDriver added in v1.10.0

func PodmanDriver() bool

PodmanDriver returns whether or not this test is using the docker or podman driver

func ReadLineWithTimeout added in v1.4.0

func ReadLineWithTimeout(b *bufio.Reader, timeout time.Duration) (string, error)

ReadLineWithTimeout reads a line of text from a buffer with a timeout

func Seconds added in v1.8.0

func Seconds(n int) time.Duration

Seconds will return timeout in minutes based on how slow the machine is

func StartArgs added in v1.4.0

func StartArgs() []string

StartArgs returns the arguments normally used for starting minikube

func Status added in v1.4.0

func Status(ctx context.Context, t *testing.T, path string, profile string, key string) string

Status returns a minikube component status as a string

func Target added in v1.4.0

func Target() string

Target returns where the minikube binary can be found

func TestMain

func TestMain(m *testing.M)

TestMain is the test main

func UniqueProfileName added in v1.4.0

func UniqueProfileName(prefix string) string

UniqueProfileName returns a reasonably unique profile name

Types

type RunResult added in v1.4.0

type RunResult struct {
	Stdout   *bytes.Buffer
	Stderr   *bytes.Buffer
	ExitCode int
	Args     []string
}

RunResult stores the result of an cmd.Run call

func Run added in v1.4.0

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

Run is a test helper to log a command being executed \_(ツ)_/¯

func (RunResult) Command added in v1.4.0

func (rr RunResult) Command() string

Command returns a human readable command string that does not induce eye fatigue

func (RunResult) Output added in v1.4.0

func (rr RunResult) Output() string

Output returns human-readable output for an execution result

type StartSession added in v1.4.0

type StartSession struct {
	Stdout *bufio.Reader
	Stderr *bufio.Reader
	// contains filtered or unexported fields
}

StartSession stores the result of an cmd.Start call

func Start added in v1.4.0

func Start(t *testing.T, cmd *exec.Cmd) (*StartSession, error)

Start starts a process in the background, streaming output

func (*StartSession) Stop added in v1.4.0

func (ss *StartSession) Stop(t *testing.T)

Stop stops the started process

Jump to

Keyboard shortcuts

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