(t *testing.T, cache cache.Cache)
| 73 | } |
| 74 | |
| 75 | func testCacheMiss(t *testing.T, cache cache.Cache) { |
| 76 | for range 100 { |
| 77 | key := strconv.Itoa(rand.Int()) // arbitrary key which should fail: no chunk key is a single integer |
| 78 | found, bufs, missing := cache.Fetch(context.Background(), []string{key}) |
| 79 | require.Empty(t, found) |
| 80 | require.Empty(t, bufs) |
| 81 | require.Len(t, missing, 1) |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | func testCache(t *testing.T, cache cache.Cache) { |
| 86 | keys, chunks := fillCache(t, cache) |
no test coverage detected