Use new archiver code in tests

This commit is contained in:
Alexander Neumann
2018-03-25 23:36:31 +02:00
parent f279731168
commit 38926d8576
5 changed files with 58 additions and 235 deletions

View File

@@ -9,7 +9,6 @@ import (
"path/filepath"
"sort"
"testing"
"time"
"github.com/restic/restic/internal/archiver"
"github.com/restic/restic/internal/checker"
@@ -326,10 +325,8 @@ func TestCheckerModifiedData(t *testing.T) {
repo, cleanup := repository.TestRepository(t)
defer cleanup()
arch := archiver.New(repo)
_, id, err := arch.Snapshot(context.TODO(), nil, []string{"."}, nil, "localhost", nil, time.Now())
test.OK(t, err)
t.Logf("archived as %v", id.Str())
sn := archiver.TestSnapshot(t, repo, ".", nil)
t.Logf("archived as %v", sn.ID().Str())
beError := &errorBackend{Backend: repo.Backend()}
checkRepo := repository.New(beError)