metatest used for both filesystem and redis Cache
(t *testing.T, c Cache)
| 160 | |
| 161 | // metatest used for both filesystem and redis Cache |
| 162 | func cacheMissHelper(t *testing.T, c Cache) { |
| 163 | for i := 0; i < 10; i++ { |
| 164 | key := &Key{ |
| 165 | Query: []byte(fmt.Sprintf("SELECT %d cache miss", i)), |
| 166 | } |
| 167 | |
| 168 | _, err := c.Get(key) |
| 169 | |
| 170 | if err != ErrMissing { |
| 171 | t.Fatalf("unexpected error: %s; expecting %s", err, ErrMissing) |
| 172 | } |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | func TestCacheClean(t *testing.T) { |
| 177 | cfg := config.Cache{ |
no test coverage detected