Documentation ¶
Overview ¶
Package util provides common test utility functions.
Index ¶
- func DeleteResource(clients client.Clients, namespace string, object *unstructured.Unstructured)
- func DeleteResources(clients client.Clients, namespace string, objects []*unstructured.Unstructured)
- func Die(t *testing.T, err error)
- func MustCreateResource(t *testing.T, clients client.Clients, namespace string, ...) *unstructured.Unstructured
- func MustCreateResources(t *testing.T, clients client.Clients, namespace string, ...)
- func MustFindResource(t *testing.T, objects []*unstructured.Unstructured, ...) *unstructured.Unstructured
- func MustGenerateServiceBrokerTLS(t *testing.T, namespace string) ([]byte, []byte, []byte)
- func MustGetNamespace(t *testing.T) *unstructured.Unstructured
- func MustReadYAMLObjects(t *testing.T, path string) []*unstructured.Unstructured
- func MustWaitFor(t *testing.T, f util.WaitFunc, timeout time.Duration)
- func ResourceCondition(clients client.Clients, namespace string, object *unstructured.Unstructured, ...) func() error
- func ResourceDeleted(clients client.Clients, namespace string, object *unstructured.Unstructured) func() error
- func SetupCRDs(clients client.Clients) error
- func WaitFor(f util.WaitFunc, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteResource ¶
func DeleteResource(clients client.Clients, namespace string, object *unstructured.Unstructured)
DeleteResource removes a resource from the system.
func DeleteResources ¶
func DeleteResources(clients client.Clients, namespace string, objects []*unstructured.Unstructured)
DeleteResources removes resources from the system.
func MustCreateResource ¶
func MustCreateResource(t *testing.T, clients client.Clients, namespace string, object *unstructured.Unstructured) *unstructured.Unstructured
MustCreateResource creates a Kubernetes resource.
func MustCreateResources ¶
func MustCreateResources(t *testing.T, clients client.Clients, namespace string, objects []*unstructured.Unstructured)
MustCreateResources creates Kubernetes objects.
func MustFindResource ¶
func MustFindResource(t *testing.T, objects []*unstructured.Unstructured, groupVersion, kind, name string) *unstructured.Unstructured
MustFindResource expects to find a specifc resource in a list of objects.
func MustGenerateServiceBrokerTLS ¶
MustGenerateServiceBrokerTLS returns TLS configuration for the service broker.
func MustGetNamespace ¶
func MustGetNamespace(t *testing.T) *unstructured.Unstructured
MustGetNamespace creates a temporary, random namespace to use for testing in.
func MustReadYAMLObjects ¶
func MustReadYAMLObjects(t *testing.T, path string) []*unstructured.Unstructured
MustReadYAMLObjects reads in a YAML file and unmarshals as unstructured objects.
func MustWaitFor ¶
MustWaitFor waits until a condition is nil.
func ResourceCondition ¶
func ResourceCondition(clients client.Clients, namespace string, object *unstructured.Unstructured, conditionType, conditionStatus string) func() error
ResourceCondition checks the resource for the specified condition.
func ResourceDeleted ¶
func ResourceDeleted(clients client.Clients, namespace string, object *unstructured.Unstructured) func() error
ResourceDeleted checks whether a resource has need deleted and no longer exists.
Types ¶
This section is empty.