require

package
v0.0.0-...-43879ce Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvTest

EnvTest returns an unstarted Environment with crds. It calls t.Skip when the "KUBEBUILDER_ASSETS" and "USE_EXISTING_CLUSTER" environment variables are unset.

func Flake8

func Flake8(t testing.TB) string

Flake8 returns the path to the "flake8" executable or calls t.Skip.

func Kubernetes

func Kubernetes(t TestingT) client.Client

Kubernetes starts or connects to a Kubernetes API and returns a client that uses it. When starting a local API, the client is a member of the "system:masters" group.

It calls t.Fatal when something fails. It stops the local API using t.Cleanup. It calls t.Skip when the "KUBEBUILDER_ASSETS" and "USE_EXISTING_CLUSTER" environment variables are unset.

Tests that call t.Parallel might share the same local API. Call t.Parallel after this function to ensure they share.

func Kubernetes2

func Kubernetes2(t TestingT) (*rest.Config, client.Client)

Kubernetes2 is the same as Kubernetes but also returns a copy of the client configuration.

func Namespace

func Namespace(t TestingT, cc client.Client) *corev1.Namespace

Namespace creates a random namespace that is deleted by t.Cleanup. It calls t.Fatal when creation fails. The caller may delete the namespace at any time.

func OpenSSL

func OpenSSL(t testing.TB) string

OpenSSL returns the path to the "openssl" executable or calls t.Skip.

func ParallelCapacity

func ParallelCapacity(t *testing.T, needed int)

ParallelCapacity calls t.Parallel then waits for needed capacity. There is no wait when needed is zero.

func ShellCheck

func ShellCheck(t testing.TB) string

ShellCheck returns the path to the "shellcheck" executable or calls t.Skip.

Types

type TestingT

type TestingT interface {
	assert.TestingT
	Cleanup(func())
	Helper()
	Name() string
	SkipNow()
}

Jump to

Keyboard shortcuts

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