testing

package
v2.21.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: Apache-2.0 Imports: 18 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) bool

func AssertDelete

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

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)) bool

func AssertGet

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

func AssertList

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

func AssertPatch

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

func AssertServerSideApply added in v2.21.0

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

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) bool

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