repository: index saving belongs into the MasterIndex
This commit is contained in:
parent
0c0e7b6957
commit
a77d5c4d11
7 changed files with 54 additions and 54 deletions
|
@ -155,8 +155,8 @@ func repack(t *testing.T, repo restic.Repository, packs restic.IDSet, blobs rest
|
|||
}
|
||||
}
|
||||
|
||||
func saveIndex(t *testing.T, repo restic.Repository) {
|
||||
if err := repo.SaveIndex(context.TODO()); err != nil {
|
||||
func flush(t *testing.T, repo restic.Repository) {
|
||||
if err := repo.Flush(context.TODO()); err != nil {
|
||||
t.Fatalf("repo.SaveIndex() %v", err)
|
||||
}
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ func testRepack(t *testing.T, version uint) {
|
|||
packsBefore, packsAfter)
|
||||
}
|
||||
|
||||
saveIndex(t, repo)
|
||||
flush(t, repo)
|
||||
|
||||
removeBlobs, keepBlobs := selectBlobs(t, repo, 0.2)
|
||||
|
||||
|
@ -297,7 +297,7 @@ func testRepackCopy(t *testing.T, version uint) {
|
|||
t.Logf("rand seed is %v", seed)
|
||||
|
||||
createRandomBlobs(t, repo, 100, 0.7)
|
||||
saveIndex(t, repo)
|
||||
flush(t, repo)
|
||||
|
||||
_, keepBlobs := selectBlobs(t, repo, 0.2)
|
||||
copyPacks := findPacksForBlobs(t, repo, keepBlobs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue