testing

package
v2.9.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FakeCreationTimestamp = metaV1.Date(2022, time.October, 19, 16, 10, 00, 00, time.Local)

Functions

func AssertContainsAllObjects added in v2.9.0

func AssertContainsAllObjects[T runtime.Object](t *testing.T, expected []runtime.Object, in []T) bool

func AssertContainsObjects added in v2.9.0

func AssertContainsObjects[T runtime.Object](t *testing.T, expected runtime.Object, in []T) bool

func AssertCreate

func AssertCreate(t *testing.T, ac k8sTesting.Action, resource string, namespace string, obj runtime.Object)

func AssertDelete

func AssertDelete(t *testing.T, ac k8sTesting.Action, resource string, namespace string, name string)

func AssertEqualObjects

func AssertEqualObjects(t *testing.T, expected runtime.Object, actual runtime.Object) bool

func AssertGenericAction added in v2.9.0

func AssertGenericAction(t *testing.T, ac k8sTesting.Action, verb string, resource string, namespace string, predicate func(t *testing.T, ac k8sTesting.GenericAction))

func AssertGet

func AssertGet(t *testing.T, ac k8sTesting.Action, resource string, namespace string, name string)

func AssertList

func AssertList(t *testing.T, ac k8sTesting.Action, resource string, namespace string, fieldSelector string, labelSelector string)

func AssertPatch

func AssertPatch(t *testing.T, ac k8sTesting.Action, resource string, namespace string, name string, patchType types.PatchType, data []byte)

func AssertWatch added in v2.9.0

func AssertWatch(t *testing.T, ac k8sTesting.Action, resource string, namespace string, fieldSelector string, labelSelector string, resourceVersion string)

func ConvertToUnstructured

func ConvertToUnstructured(obj runtime.Object) *unstructured.Unstructured

func CreateFakeClient added in v2.8.0

func CreateFakeClient(ctx context.Context, objs ...runtime.Object) (context.Context, *dynamicFake.FakeDynamicClient)

Types

This section is empty.

Jump to

Keyboard shortcuts

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