test

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertErrorMatch

func AssertErrorMatch(t *testing.T, s string, e error)

AssertErrorMatch will fail if the error doesn't match the provided error.

func AssertNoError

func AssertNoError(t *testing.T, err error)

AssertNoError will fail if the provided err value is an error.

func Labels

func Labels(l map[string]string) func(*clusterv1.Cluster)

Labels a cluster option that sets the labels on the cluster.

func MakeCluster

func MakeCluster(name, namespace string, opts ...func(*clusterv1.Cluster)) *clusterv1.Cluster

MakeCluster allocates and returns a new CAPI Cluster value.

func MakeClusterBootstrapConfig

func MakeClusterBootstrapConfig(name, namespace string, opts ...func(*capiv1alpha1.ClusterBootstrapConfig)) *capiv1alpha1.ClusterBootstrapConfig

MakeClusterBootstrapConfig allocates and returns a new ClusterBootstrapConfig value.

func MatchErrorString

func MatchErrorString(t *testing.T, s string, e error) bool

MatchErrorString takes a string and matches on the error and returns true if the string matches the error.

This is useful in table tests.

If the string can't be compiled as an regexp, then this will fail with a Fatal error.

func MatchLabels

func MatchLabels(labels map[string]string) func(*capiv1alpha1.ClusterBootstrapConfig)

MatchLabels is an option func for MakeClusterBootstrapConfig to set the labels on the new config.

Types

This section is empty.

Jump to

Keyboard shortcuts

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