testing

package
v0.25.7 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 26 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateList

func CreateList(prefix string, helper storage.Interface, list runtime.Object) error

CreateList will properly create a list using the storage interface.

func CreateObj

func CreateObj(helper storage.Interface, name string, obj, out runtime.Object, ttl uint64) error

CreateObj will create a single object using the storage interface.

func CreateObjList

func CreateObjList(prefix string, helper storage.Interface, items []runtime.Object) error

CreateObjList will create a list from the array of objects.

func DeepEqualSafePodSpec added in v0.16.4

func DeepEqualSafePodSpec() example.PodSpec

DeepEqualSafePodSpec returns an example.PodSpec safe for deep-equal operations.

func EncodeContinueOrDie added in v0.25.0

func EncodeContinueOrDie(key string, resourceVersion int64) string

func ExpectNoDiff added in v0.25.0

func ExpectNoDiff(t *testing.T, msg string, expected, got interface{})

func ResourceVersionNotOlderThan added in v0.25.0

func ResourceVersionNotOlderThan(sentinel string) func(string) error

ResourceVersionNotOlderThan returns a function to validate resource versions. Resource versions referring to points in logical time before the sentinel generate an error. All logical times as new as the sentinel or newer generate no error.

func RunTestConditionalDelete added in v0.25.0

func RunTestConditionalDelete(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestCount added in v0.25.0

func RunTestCount(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestCreate added in v0.25.0

func RunTestCreate(ctx context.Context, t *testing.T, store storage.Interface, validation KeyValidation)

func RunTestCreateWithKeyExist added in v0.25.0

func RunTestCreateWithKeyExist(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestCreateWithTTL added in v0.25.0

func RunTestCreateWithTTL(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestDeleteTriggerWatch added in v0.25.0

func RunTestDeleteTriggerWatch(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestDeleteWithSuggestion added in v0.25.0

func RunTestDeleteWithSuggestion(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestDeleteWithSuggestionAndConflict added in v0.25.0

func RunTestDeleteWithSuggestionAndConflict(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestDeleteWithSuggestionOfDeletedObject added in v0.25.0

func RunTestDeleteWithSuggestionOfDeletedObject(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestGet added in v0.25.0

func RunTestGet(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestGetListNonRecursive added in v0.25.0

func RunTestGetListNonRecursive(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestGuaranteedUpdateWithConflict added in v0.25.0

func RunTestGuaranteedUpdateWithConflict(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestGuaranteedUpdateWithSuggestionAndConflict added in v0.25.0

func RunTestGuaranteedUpdateWithSuggestionAndConflict(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestGuaranteedUpdateWithTTL added in v0.25.0

func RunTestGuaranteedUpdateWithTTL(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestList added in v0.25.0

func RunTestList(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestListWithoutPaging added in v0.25.0

func RunTestListWithoutPaging(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestPreconditionalDeleteWithSuggestion added in v0.25.0

func RunTestPreconditionalDeleteWithSuggestion(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestUnconditionalDelete added in v0.25.0

func RunTestUnconditionalDelete(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestValidateDeletionWithSuggestion added in v0.25.0

func RunTestValidateDeletionWithSuggestion(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestWatch added in v0.25.0

func RunTestWatch(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestWatchContextCancel added in v0.25.0

func RunTestWatchContextCancel(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestWatchFromNoneZero added in v0.25.0

func RunTestWatchFromNoneZero(ctx context.Context, t *testing.T, store storage.Interface)

func RunTestWatchInitializationSignal added in v0.25.0

func RunTestWatchInitializationSignal(ctx context.Context, t *testing.T, store storage.Interface)

func TestCheckEventType added in v0.25.0

func TestCheckEventType(t *testing.T, expectEventType watch.EventType, w watch.Interface)

func TestCheckResult added in v0.25.0

func TestCheckResult(t *testing.T, expectEventType watch.EventType, w watch.Interface, expectObj *example.Pod)

func TestCheckResultFunc added in v0.25.0

func TestCheckResultFunc(t *testing.T, expectEventType watch.EventType, w watch.Interface, check func(object runtime.Object) error)

func TestCheckStop added in v0.25.0

func TestCheckStop(t *testing.T, w watch.Interface)

func TestPropogateStore added in v0.25.0

func TestPropogateStore(ctx context.Context, t *testing.T, store storage.Interface, obj *example.Pod) (string, *example.Pod)

TestPropogateStore helps propagates store with objects, automates key generation, and returns keys and stored objects.

func TestPropogateStoreWithKey added in v0.25.0

func TestPropogateStoreWithKey(ctx context.Context, t *testing.T, store storage.Interface, key string, obj *example.Pod) *example.Pod

TestPropogateStoreWithKey helps propagate store with objects, the given object will be stored at the specified key.

Types

type KeyValidation added in v0.25.0

type KeyValidation func(ctx context.Context, t *testing.T, key string)

Jump to

Keyboard shortcuts

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