(t *testing.T)
| 259 | } |
| 260 | |
| 261 | func newTestCache(t *testing.T) *fileSystemCache { |
| 262 | t.Helper() |
| 263 | |
| 264 | cfg := config.Cache{ |
| 265 | Name: "foobar", |
| 266 | FileSystem: config.FileSystemCacheConfig{ |
| 267 | Dir: testDir, |
| 268 | MaxSize: 1e6, |
| 269 | }, |
| 270 | Expire: config.Duration(time.Minute), |
| 271 | } |
| 272 | c, err := newFilesSystemCache(cfg, 1*time.Second) |
| 273 | if err != nil { |
| 274 | t.Fatal(err) |
| 275 | } |
| 276 | return c |
| 277 | } |
no test coverage detected