MCPcopy Create free account
hub / github.com/AdRoll/baker / assertKeyInHotCache

Function assertKeyInHotCache

pkg/buffercache/helper_test.go:78–91  ·  view source on GitHub ↗
(t *testing.T, cache *BufferCache, key string)

Source from the content-addressed store, hash-verified

76}
77
78func assertKeyInHotCache(t *testing.T, cache *BufferCache, key string) {
79 t.Helper()
80
81 loc, ok := cache.m.m[key]
82 if !ok {
83 t.Fatalf(`key "%s" not found in location map`, key)
84 }
85 if !loc.isHot() {
86 t.Errorf("not in hot cache: got loc=%v", loc)
87 }
88 if _, ok := cache.hot.m[key]; !ok {
89 t.Errorf(`key "%s" not found in hot cache`, key)
90 }
91}
92
93func assertKeyNotInHotCache(t *testing.T, cache *BufferCache, key string) {
94 t.Helper()

Calls 1

isHotMethod · 0.80

Tested by

no test coverage detected