package testing
import "k8s.io/apiserver/pkg/storage/testing"
Index ¶
- func CreateList(prefix string, helper storage.Interface, list runtime.Object) error
- func CreateObj(helper storage.Interface, name string, obj, out runtime.Object, ttl uint64) error
- func CreateObjList(prefix string, helper storage.Interface, items []runtime.Object) error
- func DeepEqualSafePodSpec() example.PodSpec
- func EncodeContinueOrDie(key string, resourceVersion int64) string
- func ExpectNoDiff(t *testing.T, msg string, expected, got interface{})
- func ResourceVersionNotOlderThan(sentinel string) func(string) error
- func RunTestConditionalDelete(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestCount(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestCreate(ctx context.Context, t *testing.T, store storage.Interface, validation KeyValidation)
- func RunTestCreateWithKeyExist(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestCreateWithTTL(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestDeleteTriggerWatch(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestDeleteWithSuggestion(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestDeleteWithSuggestionAndConflict(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestDeleteWithSuggestionOfDeletedObject(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestGet(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestGetListNonRecursive(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestGuaranteedUpdateWithConflict(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestGuaranteedUpdateWithSuggestionAndConflict(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestGuaranteedUpdateWithTTL(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestList(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestListWithoutPaging(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestPreconditionalDeleteWithSuggestion(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestUnconditionalDelete(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestValidateDeletionWithSuggestion(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestWatch(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestWatchContextCancel(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestWatchFromNoneZero(ctx context.Context, t *testing.T, store storage.Interface)
- func RunTestWatchInitializationSignal(ctx context.Context, t *testing.T, store storage.Interface)
- func TestCheckEventType(t *testing.T, expectEventType watch.EventType, w watch.Interface)
- func TestCheckResult(t *testing.T, expectEventType watch.EventType, w watch.Interface, expectObj *example.Pod)
- func TestCheckResultFunc(t *testing.T, expectEventType watch.EventType, w watch.Interface, check func(object runtime.Object) error)
- func TestCheckStop(t *testing.T, w watch.Interface)
- func TestPropogateStore(ctx context.Context, t *testing.T, store storage.Interface, obj *example.Pod) (string, *example.Pod)
- func TestPropogateStoreWithKey(ctx context.Context, t *testing.T, store storage.Interface, key string, obj *example.Pod) *example.Pod
- type KeyValidation
Functions ¶
func CreateList ¶
CreateList will properly create a list using the storage interface.
func CreateObj ¶
CreateObj will create a single object using the storage interface.
func CreateObjList ¶
CreateObjList will create a list from the array of objects.
func DeepEqualSafePodSpec ¶
DeepEqualSafePodSpec returns an example.PodSpec safe for deep-equal operations.
func EncodeContinueOrDie ¶
func ExpectNoDiff ¶
func ResourceVersionNotOlderThan ¶
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 ¶
func RunTestCount ¶
func RunTestCreate ¶
func RunTestCreate(ctx context.Context, t *testing.T, store storage.Interface, validation KeyValidation)
func RunTestCreateWithKeyExist ¶
func RunTestCreateWithTTL ¶
func RunTestDeleteTriggerWatch ¶
func RunTestDeleteWithSuggestion ¶
func RunTestDeleteWithSuggestionAndConflict ¶
func RunTestDeleteWithSuggestionAndConflict(ctx context.Context, t *testing.T, store storage.Interface)
func RunTestDeleteWithSuggestionOfDeletedObject ¶
func RunTestDeleteWithSuggestionOfDeletedObject(ctx context.Context, t *testing.T, store storage.Interface)
func RunTestGet ¶
func RunTestGetListNonRecursive ¶
func RunTestGuaranteedUpdateWithConflict ¶
func RunTestGuaranteedUpdateWithConflict(ctx context.Context, t *testing.T, store storage.Interface)
func RunTestGuaranteedUpdateWithSuggestionAndConflict ¶
func RunTestGuaranteedUpdateWithSuggestionAndConflict(ctx context.Context, t *testing.T, store storage.Interface)
func RunTestGuaranteedUpdateWithTTL ¶
func RunTestList ¶
func RunTestListWithoutPaging ¶
func RunTestPreconditionalDeleteWithSuggestion ¶
func RunTestPreconditionalDeleteWithSuggestion(ctx context.Context, t *testing.T, store storage.Interface)
func RunTestUnconditionalDelete ¶
func RunTestValidateDeletionWithSuggestion ¶
func RunTestValidateDeletionWithSuggestion(ctx context.Context, t *testing.T, store storage.Interface)
func RunTestWatch ¶
func RunTestWatchContextCancel ¶
func RunTestWatchFromNoneZero ¶
func RunTestWatchInitializationSignal ¶
func TestCheckEventType ¶
func TestCheckResult ¶
func TestCheckResult(t *testing.T, expectEventType watch.EventType, w watch.Interface, expectObj *example.Pod)
func TestCheckResultFunc ¶
func TestCheckResultFunc(t *testing.T, expectEventType watch.EventType, w watch.Interface, check func(object runtime.Object) error)
func TestCheckStop ¶
func TestPropogateStore ¶
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 ¶
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 ¶
Source Files ¶
store_tests.go utils.go watcher_tests.go
- Version
- v0.25.5-rc.0
- Published
- Nov 10, 2022
- Platform
- js/wasm
- Imports
- 26 packages
- Last checked
- now –
Tools for package owners.