lib/db: Report number of repaired items from checkGlobal (#7329)

This commit is contained in:
Simon Frei
2021-02-04 14:42:46 +01:00
committed by GitHub
parent ade8d79d42
commit 070bf3b776
2 changed files with 21 additions and 14 deletions
+3 -1
View File
@@ -513,8 +513,10 @@ func TestCheckGlobals(t *testing.T) {
}
// Clean up global entry of the now missing file
if err := db.checkGlobals([]byte(fs.folder)); err != nil {
if repaired, err := db.checkGlobals([]byte(fs.folder)); err != nil {
t.Fatal(err)
} else if repaired != 1 {
t.Error("Expected 1 repaired global item, got", repaired)
}
// Check that the global entry is gone