From 0e445ec0f5ac362ecaa9d7ca9266a7cff8dd92f3 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Tue, 24 Jan 2017 09:23:13 +0100 Subject: [PATCH] checker: Use TestRepository --- src/restic/checker/checker_test.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/restic/checker/checker_test.go b/src/restic/checker/checker_test.go index bdd611471..612fc6053 100644 --- a/src/restic/checker/checker_test.go +++ b/src/restic/checker/checker_test.go @@ -9,7 +9,6 @@ import ( "restic" "restic/archiver" - "restic/backend/mem" "restic/checker" "restic/repository" "restic/test" @@ -249,19 +248,15 @@ func induceError(data []byte) { } func TestCheckerModifiedData(t *testing.T) { - be := mem.New() - - repository.TestUseLowSecurityKDFParameters(t) - - repo := repository.New(be) - test.OK(t, repo.Init(test.TestPassword)) + repo, cleanup := repository.TestRepository(t) + defer cleanup() arch := archiver.New(repo) _, id, err := arch.Snapshot(nil, []string{"."}, nil, nil) test.OK(t, err) t.Logf("archived as %v", id.Str()) - beError := &errorBackend{Backend: be} + beError := &errorBackend{Backend: repo.Backend()} checkRepo := repository.New(beError) test.OK(t, checkRepo.SearchKey(test.TestPassword, 5))