dtest

package
v0.86.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerRegistry

func DockerRegistry() string

DockerRegistry returns a docker registry suitable for use in tests.

func GetKubeconfig

func GetKubeconfig() string

GetKubeconfig returns the kubeconfig contents for the running k3s cluster as a string. It will return the empty string if no cluster is running.

func K3sDown

func K3sDown() string

K3sDown shuts down the k3s cluster.

func K3sUp

func K3sUp() string

K3sUp will launch if necessary and return the docker id of a container running a k3s cluster.

func K8sApply

func K8sApply(files ...string)

K8sApply applies the supplied manifests to the cluster indicated by the supplied kubeconfig.

func Kubeconfig

func Kubeconfig() string

Kubeconfig returns a path referencing a kubeconfig file suitable for use in tests.

func RegistryDown

func RegistryDown() string

RegistryDown shutsdown the test registry.

func RegistryUp

func RegistryUp() string

RegistryUp will launch if necessary and return the docker id of a container running a docker registry.

func Sudo

func Sudo()

Sudo is intended for use in a TestMain. It will relaunch the test executable via sudo if it isn't already running with an effective userid of root.

func WithMachineLock

func WithMachineLock(body func())

WithMachineLock executes the supplied body with a guarantee that it is the only code running (via WithMachineLock) on the machine.

func WithNamedMachineLock

func WithNamedMachineLock(name string, body func())

WithNamedMachineLock executes the supplied body with a guarantee that it is the only code running (via WithMachineLock) on the machine. The name provides scope so this can be used in multiple independent ways without conflicts.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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