mirror of
https://github.com/restic/restic.git
synced 2026-09-01 02:07:14 +00:00
remove usages of repo.Backend() from tests
This commit is contained in:
@@ -66,7 +66,7 @@ func (be *failLockLoadingBackend) Load(ctx context.Context, h backend.Handle, le
|
||||
|
||||
func TestMultipleLockFailure(t *testing.T) {
|
||||
be := &failLockLoadingBackend{Backend: mem.New()}
|
||||
repo := repository.TestRepositoryWithBackend(t, be, 0, repository.Options{})
|
||||
repo, _ := repository.TestRepositoryWithBackend(t, be, 0, repository.Options{})
|
||||
restic.TestSetLockTimeout(t, 5*time.Millisecond)
|
||||
|
||||
lock1, err := restic.NewLock(context.TODO(), repo)
|
||||
|
||||
@@ -32,7 +32,7 @@ func TestLoadJSONUnpacked(t *testing.T) {
|
||||
}
|
||||
|
||||
func testLoadJSONUnpacked(t *testing.T, version uint) {
|
||||
repo := repository.TestRepositoryWithVersion(t, version)
|
||||
repo, _ := repository.TestRepositoryWithVersion(t, version)
|
||||
|
||||
// archive a snapshot
|
||||
sn := restic.Snapshot{}
|
||||
|
||||
@@ -181,7 +181,7 @@ func testLoadTree(t *testing.T, version uint) {
|
||||
}
|
||||
|
||||
// archive a few files
|
||||
repo := repository.TestRepositoryWithVersion(t, version)
|
||||
repo, _ := repository.TestRepositoryWithVersion(t, version)
|
||||
sn := archiver.TestSnapshot(t, repo, rtest.BenchArchiveDirectory, nil)
|
||||
rtest.OK(t, repo.Flush(context.Background()))
|
||||
|
||||
@@ -199,7 +199,7 @@ func benchmarkLoadTree(t *testing.B, version uint) {
|
||||
}
|
||||
|
||||
// archive a few files
|
||||
repo := repository.TestRepositoryWithVersion(t, version)
|
||||
repo, _ := repository.TestRepositoryWithVersion(t, version)
|
||||
sn := archiver.TestSnapshot(t, repo, rtest.BenchArchiveDirectory, nil)
|
||||
rtest.OK(t, repo.Flush(context.Background()))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user