testing

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertAction

func AssertAction(t *testing.T, actual clienttesting.Action, expected string)

func AssertActions

func AssertActions(t *testing.T, actualActions []clienttesting.Action, expectedVerbs ...string)

AssertActions asserts the actual actions have the expected action verb

func AssertCondition

func AssertCondition(
	t *testing.T,
	actualConditions []metav1.Condition,
	expectedCondition metav1.Condition)

AssertCondition asserts the actual conditions has the expected condition

func AssertDelete

func AssertDelete(t *testing.T, actual clienttesting.Action, resource, namespace, name string)

func AssertEqualNameNamespace

func AssertEqualNameNamespace(t *testing.T, actualName, actualNamespace, name, namespace string)

func AssertEqualNumber

func AssertEqualNumber(t *testing.T, actual, expected int)

func AssertError

func AssertError(t *testing.T, actual error, expectedErr string)

AssertError asserts the actual error representation is the same with the expected, if the expected error representation is empty, the actual should be nil

func AssertErrorWithPrefix

func AssertErrorWithPrefix(t *testing.T, actual error, expectedErrorPrefix string)

AssertError asserts the actual error representation starts with the expected prerfix, if the expected error prefix is empty, the actual should be nil

func AssertFinalizers

func AssertFinalizers(t *testing.T, obj runtime.Object, finalizers []string)

AssertFinalizers asserts the given runtime object has the expected finalizers

func AssertGet

func AssertGet(t *testing.T, actual clienttesting.Action, group, version, resource string)

func AssertNoActions

func AssertNoActions(t *testing.T, actualActions []clienttesting.Action)

AssertNoActions asserts no actions are happened

func AssertNoMoreUpdates

func AssertNoMoreUpdates(t *testing.T, actions []clienttesting.Action)

AssertNoMoreUpdates asserts only one update action in given actions

func AssertUpdateActions

func AssertUpdateActions(t *testing.T, actions []clienttesting.Action)

AssertUpdateActions asserts the actions are get-then-update action

Types

This section is empty.

Jump to

Keyboard shortcuts

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