mirror of
https://github.com/restic/restic.git
synced 2025-12-11 18:47:50 +00:00
remove usages of repo.Backend() from tests
This commit is contained in:
@@ -215,7 +215,7 @@ func TestRepack(t *testing.T) {
|
||||
}
|
||||
|
||||
func testRepack(t *testing.T, version uint) {
|
||||
repo := repository.TestRepositoryWithVersion(t, version)
|
||||
repo, _ := repository.TestRepositoryWithVersion(t, version)
|
||||
|
||||
seed := time.Now().UnixNano()
|
||||
rand.Seed(seed)
|
||||
@@ -293,8 +293,8 @@ func (r oneConnectionRepo) Connections() uint {
|
||||
}
|
||||
|
||||
func testRepackCopy(t *testing.T, version uint) {
|
||||
repo := repository.TestRepositoryWithVersion(t, version)
|
||||
dstRepo := repository.TestRepositoryWithVersion(t, version)
|
||||
repo, _ := repository.TestRepositoryWithVersion(t, version)
|
||||
dstRepo, _ := repository.TestRepositoryWithVersion(t, version)
|
||||
|
||||
// test with minimal possible connection count
|
||||
repoWrapped := &oneConnectionRepo{repo}
|
||||
@@ -340,7 +340,7 @@ func TestRepackWrongBlob(t *testing.T) {
|
||||
|
||||
func testRepackWrongBlob(t *testing.T, version uint) {
|
||||
// disable verification to allow adding corrupted blobs to the repository
|
||||
repo := repository.TestRepositoryWithBackend(t, nil, version, repository.Options{NoExtraVerify: true})
|
||||
repo, _ := repository.TestRepositoryWithBackend(t, nil, version, repository.Options{NoExtraVerify: true})
|
||||
|
||||
seed := time.Now().UnixNano()
|
||||
rand.Seed(seed)
|
||||
@@ -366,7 +366,7 @@ func TestRepackBlobFallback(t *testing.T) {
|
||||
|
||||
func testRepackBlobFallback(t *testing.T, version uint) {
|
||||
// disable verification to allow adding corrupted blobs to the repository
|
||||
repo := repository.TestRepositoryWithBackend(t, nil, version, repository.Options{NoExtraVerify: true})
|
||||
repo, _ := repository.TestRepositoryWithBackend(t, nil, version, repository.Options{NoExtraVerify: true})
|
||||
|
||||
seed := time.Now().UnixNano()
|
||||
rand.Seed(seed)
|
||||
|
||||
Reference in New Issue
Block a user