(t *testing.T)
| 23 | ) |
| 24 | |
| 25 | func TestGetKey(t *testing.T) { |
| 26 | name := newRandomStringN(10) |
| 27 | offset := int64(100) |
| 28 | c := NewCache(context.Background(), cacheBlockSize, testFileCachePath) |
| 29 | got := c.(*fileCache).getKey(name, offset) |
| 30 | want := fmt.Sprintf("%v/%v/%v", testFileCachePath, name, offset) |
| 31 | if got != want { |
| 32 | t.Errorf("expected: %v, got: %v", want, got) |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | func TestExists(t *testing.T) { |
| 37 | c := NewCache(context.Background(), cacheBlockSize, testFileCachePath) |
nothing calls this directly
no test coverage detected