kubernetes/staging/src/k8s.io/apiserver/pkg/storage/testing/utils.go

// CreateObjList will create a list from the array of objects.
func CreateObjList(prefix string, helper storage.Interface, items []runtime.Object) error {}

// CreateList will properly create a list using the storage interface.
func CreateList(prefix string, helper storage.Interface, list runtime.Object) error {}

// DeepEqualSafePodSpec returns an example.PodSpec safe for deep-equal operations.
func DeepEqualSafePodSpec() example.PodSpec {}

func computePodKey(obj *example.Pod) string {}

// testPropagateStore helps propagates store with objects, automates key generation, and returns
// keys and stored objects.
func testPropagateStore(ctx context.Context, t *testing.T, store storage.Interface, obj *example.Pod) (string, *example.Pod) {}

func expectNoDiff(t *testing.T, msg string, expected, actual interface{}

func ExpectContains(t *testing.T, msg string, expectedList []interface{}

const dummyPrefix

func encodeContinueOrDie(key string, resourceVersion int64) string {}

func testCheckEventType(t *testing.T, w watch.Interface, expectEventType watch.EventType) {}

func testCheckResult(t *testing.T, w watch.Interface, expectEvent watch.Event) {}

func testCheckResultFunc(t *testing.T, w watch.Interface, check func(actualEvent watch.Event)) {}

func testCheckResultWithIgnoreFunc(t *testing.T, w watch.Interface, expectedEvents []watch.Event, ignore func(watch.Event) bool) {}

func testCheckStop(t *testing.T, w watch.Interface) {}

func TestCheckResultsInStrictOrder(t *testing.T, w watch.Interface, expectedEvents []watch.Event) {}

func TestCheckNoMoreResultsWithIgnoreFunc(t *testing.T, w watch.Interface, ignore func(watch.Event) bool) {}

func toInterfaceSlice[T any](s []T) []interface{}

// 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 resourceVersionNotOlderThan(sentinel string) func(string) error {}

type StorageInjectingListErrors

func (s *StorageInjectingListErrors) GetList(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error {}

func (s *StorageInjectingListErrors) ErrorsConsumed() (bool, error) {}

type PrefixTransformer

func NewPrefixTransformer(prefix []byte, stale bool) *PrefixTransformer {}

func (p *PrefixTransformer) TransformFromStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, bool, error) {}

func (p *PrefixTransformer) TransformToStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, error) {}

func (p *PrefixTransformer) GetReadsAndReset() uint64 {}

type reproducingTransformer

func (rt *reproducingTransformer) TransformFromStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, bool, error) {}

func (rt *reproducingTransformer) TransformToStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, error) {}

func (rt *reproducingTransformer) createObject(ctx context.Context) error {}

type failingTransformer

func (ft *failingTransformer) TransformFromStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, bool, error) {}

func (ft *failingTransformer) TransformToStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, error) {}

type sortablePodList

func (s sortablePodList) Len() int {}

func (s sortablePodList) Less(i, j int) bool {}

func (s sortablePodList) Swap(i, j int) {}