test

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteCli

func ExecuteCli() (string, string, error)

ExecuteCli executes the CLI setup before executing the test

func Mkdir

func Mkdir(dir string)

Mkdir creates directory dir, including non-existing parent directories.

func OverrideKubeConfig

func OverrideKubeConfig() (teardown func())

OverrideKubeConfig overrides the default KUBECONFIG location to a temporary one

func OverrideKubeConfigAndCreateContextInNamespace

func OverrideKubeConfigAndCreateContextInNamespace(namespace string) (teardown func())

OverrideKubeConfigAndCreateContextInNamespace overrides the default KUBECONFIG location to a temporary one and creates a mock context in the given namespace

func OverrideKubeConfigAndCreateDefaultContext

func OverrideKubeConfigAndCreateDefaultContext() (teardown func())

OverrideKubeConfigAndCreateDefaultContext initializes the default KUBECONFIG location to a temporary one and creates a mock context in the "default" namespace

func SetupCliTest

func SetupCliTest(cli string, factory context.CommandFactory, kubeObjects ...runtime.Object) (ctx *context.CommandContext)

SetupCliTest creates the CLI default test environment. The mocked Kubernetes client does not support OpenShift.

func SetupCliTestWithKubeClient

func SetupCliTestWithKubeClient(cmd string, factory context.CommandFactory, kubeCli *client.Client) (ctx *context.CommandContext)

SetupCliTestWithKubeClient Setup a CLI test environment with the given Kubernetes client

func TempDirWithFile

func TempDirWithFile(dir string, file string) string

TempDirWithFile creates a temporary directory dir with a temporary file

Types

This section is empty.

Jump to

Keyboard shortcuts

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