mirror of
https://github.com/restic/restic.git
synced 2025-10-09 13:49:58 +00:00
test cleanups
This commit is contained in:
@@ -199,11 +199,6 @@ func rebuildIndex(t *testing.T, repo restic.Repository) {
|
||||
}
|
||||
|
||||
func reloadIndex(t *testing.T, repo restic.Repository) {
|
||||
err := repo.SetIndex(index.NewMasterIndex())
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if err := repo.LoadIndex(context.TODO(), nil); err != nil {
|
||||
t.Fatalf("error loading new index: %v", err)
|
||||
}
|
||||
|
@@ -8,7 +8,6 @@ import (
|
||||
|
||||
"github.com/restic/restic/internal/backend"
|
||||
backendtest "github.com/restic/restic/internal/backend/test"
|
||||
"github.com/restic/restic/internal/index"
|
||||
"github.com/restic/restic/internal/repository"
|
||||
"github.com/restic/restic/internal/restic"
|
||||
"github.com/restic/restic/internal/test"
|
||||
@@ -118,7 +117,6 @@ func testRepairBrokenPack(t *testing.T, version uint) {
|
||||
|
||||
rtest.OK(t, repository.RepairPacks(context.TODO(), repo, toRepair, &progress.NoopPrinter{}))
|
||||
// reload index
|
||||
rtest.OK(t, repo.SetIndex(index.NewMasterIndex()))
|
||||
rtest.OK(t, repo.LoadIndex(context.TODO(), nil))
|
||||
|
||||
packsAfter := listPacks(t, repo)
|
||||
|
Reference in New Issue
Block a user