feat(backend): immutable cache dir scheme + stale sweep
This commit is contained in:
@@ -77,6 +77,20 @@ func TestBooksDiffLifecycle(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestBookHashes(t *testing.T) {
|
||||
s := setup(t)
|
||||
ctx := context.Background()
|
||||
libID, _ := s.CreateLibrary(ctx, "l", "/data/books/l")
|
||||
bid, _ := s.InsertBook(ctx, libID, "a.cbz", "a", "cbz", 100, 2000, 1)
|
||||
m, err := s.BookHashes(ctx)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if v := m[bid]; v[0] != 100 || v[1] != 2000 {
|
||||
t.Fatalf("bad hashes %+v", v)
|
||||
}
|
||||
}
|
||||
|
||||
func TestProgressUpsertAndJoin(t *testing.T) {
|
||||
s := setup(t)
|
||||
ctx := context.Background()
|
||||
|
||||
Reference in New Issue
Block a user