kubernetes/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go

func newTestCacherWithoutSyncing(s storage.Interface) (*Cacher, storage.Versioner, error) {}

func newTestCacher(s storage.Interface) (*Cacher, storage.Versioner, error) {}

type dummyStorage

func (d *dummyStorage) RequestWatchProgress(ctx context.Context) error {}

func (d *dummyStorage) getRequestWatchProgressCounter() int {}

type dummyWatch

func (w *dummyWatch) ResultChan() <-chan watch.Event {}

func (w *dummyWatch) Stop() {}

func newDummyWatch() watch.Interface {}

func (d *dummyStorage) Versioner() storage.Versioner {}

func (d *dummyStorage) Create(_ context.Context, _ string, _, _ runtime.Object, _ uint64) error {}

func (d *dummyStorage) Delete(_ context.Context, _ string, _ runtime.Object, _ *storage.Preconditions, _ storage.ValidateObjectFunc, _ runtime.Object, _ storage.DeleteOptions) error {}

func (d *dummyStorage) Watch(ctx context.Context, key string, opts storage.ListOptions) (watch.Interface, error) {}

func (d *dummyStorage) Get(_ context.Context, _ string, _ storage.GetOptions, _ runtime.Object) error {}

func (d *dummyStorage) GetList(ctx context.Context, resPrefix string, opts storage.ListOptions, listObj runtime.Object) error {}

func (d *dummyStorage) GuaranteedUpdate(_ context.Context, _ string, _ runtime.Object, _ bool, _ *storage.Preconditions, _ storage.UpdateFunc, _ runtime.Object) error {}

func (d *dummyStorage) Count(_ string) (int64, error) {}

func (d *dummyStorage) ReadinessCheck() error {}

func (d *dummyStorage) injectError(err error) {}

func TestGetListCacheBypass(t *testing.T) {}

func testGetListCacheBypass(t *testing.T, options storage.ListOptions, expectBypass bool) {}

func TestConsistentReadFallback(t *testing.T) {}

func TestGetListNonRecursiveCacheBypass(t *testing.T) {}

func TestGetCacheBypass(t *testing.T) {}

func TestWatchCacheBypass(t *testing.T) {}

func TestTooManyRequestsNotReturned(t *testing.T) {}

func TestEmptyWatchEventCache(t *testing.T) {}

func TestWatchNotHangingOnStartupFailure(t *testing.T) {}

func TestWatcherNotGoingBackInTime(t *testing.T) {}

func TestCacherDontAcceptRequestsStopped(t *testing.T) {}

func TestCacherDontMissEventsOnReinitialization(t *testing.T) {}

func TestCacherNoLeakWithMultipleWatchers(t *testing.T) {}

func testCacherSendBookmarkEvents(t *testing.T, allowWatchBookmarks, expectedBookmarks bool) {}

func TestCacherSendBookmarkEvents(t *testing.T) {}

func TestInitialEventsEndBookmark(t *testing.T) {}

func TestCacherSendsMultipleWatchBookmarks(t *testing.T) {}

func TestDispatchingBookmarkEventsWithConcurrentStop(t *testing.T) {}

func TestBookmarksOnResourceVersionUpdates(t *testing.T) {}

type fakeTimeBudget

func (f *fakeTimeBudget) takeAvailable() time.Duration {}

func (f *fakeTimeBudget) returnUnused(_ time.Duration) {}

func TestStartingResourceVersion(t *testing.T) {}

func TestDispatchEventWillNotBeBlockedByTimedOutWatcher(t *testing.T) {}

func verifyEvents(t *testing.T, w watch.Interface, events []watch.Event, strictOrder bool) {}

func TestCachingDeleteEvents(t *testing.T) {}

func testCachingObjects(t *testing.T, watchersCount int) {}

func TestCachingObjects(t *testing.T) {}

func TestCacheIntervalInvalidationStopsWatch(t *testing.T) {}

func TestWaitUntilWatchCacheFreshAndForceAllEvents(t *testing.T) {}

type fakeStorage

func newObjectStorage(fakePods []example.Pod) *fakeStorage {}

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

func (m fakeStorage) Watch(_ context.Context, _ string, _ storage.ListOptions) (watch.Interface, error) {}

func BenchmarkCacher_GetList(b *testing.B) {}

// TestWatchListIsSynchronisedWhenNoEventsFromStoreReceived makes sure that
// a bookmark event will be delivered even if the cacher has not received an event.
func TestWatchListIsSynchronisedWhenNoEventsFromStoreReceived(t *testing.T) {}

func TestForgetWatcher(t *testing.T) {}

// TestGetWatchCacheResourceVersion test the following cases:
//
// +-----------------+---------------------+-----------------------+
// | ResourceVersion | AllowWatchBookmarks | SendInitialEvents     |
// +=================+=====================+=======================+
// | Unset           | true/false          | nil/true/false        |
// | 0               | true/false          | nil/true/false        |
// | 95             | true/false          | nil/true/false         |
// +-----------------+---------------------+-----------------------+
// where:
// - false indicates the value of the param was set to "false" by a test case
// - true  indicates the value of the param was set to "true" by a test case
func TestGetWatchCacheResourceVersion(t *testing.T) {}

// TestGetBookmarkAfterResourceVersionLockedFunc test the following cases:
//
// +-----------------+---------------------+-----------------------+
// | ResourceVersion | AllowWatchBookmarks | SendInitialEvents     |
// +=================+=====================+=======================+
// | Unset           | true/false          | nil/true/false        |
// | 0               | true/false          | nil/true/false        |
// | 95             | true/false          | nil/true/false         |
// +-----------------+---------------------+-----------------------+
// where:
// - false indicates the value of the param was set to "false" by a test case
// - true  indicates the value of the param was set to "true" by a test case
func TestGetBookmarkAfterResourceVersionLockedFunc(t *testing.T) {}

func TestWatchStreamSeparation(t *testing.T) {}

func TestComputeListLimit(t *testing.T) {}

func watchAndWaitForBookmark(t *testing.T, ctx context.Context, etcdStorage storage.Interface) func() (resourceVersion uint64) {}

// TODO(p0lyn0mial): forceRequestWatchProgressSupport inits the storage layer
// so that tests that require storage.RequestWatchProgress pass
//
// In the future we could have a function that would allow for setting the feature
// only for duration of a test.
func forceRequestWatchProgressSupport(t *testing.T) {}