MCPcopy
hub / github.com/kubernetes/client-go / TestReadsDoNotCallPush

Function TestReadsDoNotCallPush

tools/cache/undelta_store_test.go:95–105  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

93}
94
95func TestReadsDoNotCallPush(t *testing.T) {
96 push := func(m []interface{}) {
97 t.Errorf("Unexpected call to push!")
98 }
99
100 u := NewUndeltaStore(push, testUndeltaKeyFunc)
101
102 // These should not call push.
103 _ = u.List()
104 _, _, _ = u.Get(testUndeltaObject{"a", ""})
105}
106
107func TestReplaceCallsPush(t *testing.T) {
108 mkObj := func(name string, val interface{}) testUndeltaObject {

Callers

nothing calls this directly

Calls 4

NewUndeltaStoreFunction · 0.85
ErrorfMethod · 0.65
ListMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected