Documentation
¶
Index ¶
- func EnvTest(t TestingT, crds envtest.CRDInstallOptions) *envtest.Environment
- func Flake8(t testing.TB) string
- func Kubernetes(t TestingT) client.Client
- func Kubernetes2(t TestingT) (*rest.Config, client.Client)
- func Namespace(t TestingT, cc client.Client) *corev1.Namespace
- func OpenSSL(t testing.TB) string
- func ParallelCapacity(t *testing.T, needed int)
- func ShellCheck(t testing.TB) string
- type TestingT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvTest ¶
func EnvTest(t TestingT, crds envtest.CRDInstallOptions) *envtest.Environment
EnvTest returns an unstarted Environment with crds. It calls t.Skip when the "KUBEBUILDER_ASSETS" and "USE_EXISTING_CLUSTER" environment variables are unset.
func Kubernetes ¶
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 ¶
Kubernetes2 is the same as Kubernetes but also returns a copy of the client configuration.
func 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 ParallelCapacity ¶
ParallelCapacity calls t.Parallel then waits for needed capacity. There is no wait when needed is zero.
func ShellCheck ¶
ShellCheck returns the path to the "shellcheck" executable or calls t.Skip.