mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-25 23:43:49 +00:00
Merge pull request #7129 from ThomasWaldmann/fix-6070-master
improve/clarify strange test code, fixes #6070
This commit is contained in:
commit
5713908ce1
1 changed files with 3 additions and 7 deletions
|
@ -227,15 +227,11 @@ def test_unknown_feature_on_mount(self):
|
||||||
|
|
||||||
@pytest.mark.allow_cache_wipe
|
@pytest.mark.allow_cache_wipe
|
||||||
def test_unknown_mandatory_feature_in_cache(self):
|
def test_unknown_mandatory_feature_in_cache(self):
|
||||||
if self.prefix:
|
remote_repo = bool(self.prefix)
|
||||||
path_prefix = "ssh://__testsuite__"
|
|
||||||
else:
|
|
||||||
path_prefix = ""
|
|
||||||
|
|
||||||
print(self.cmd(f"--repo={self.repository_location}", "rcreate", RK_ENCRYPTION))
|
print(self.cmd(f"--repo={self.repository_location}", "rcreate", RK_ENCRYPTION))
|
||||||
|
|
||||||
with Repository(self.repository_path, exclusive=True) as repository:
|
with Repository(self.repository_path, exclusive=True) as repository:
|
||||||
if path_prefix:
|
if remote_repo:
|
||||||
repository._location = Location(self.repository_location)
|
repository._location = Location(self.repository_location)
|
||||||
manifest = Manifest.load(repository, Manifest.NO_OPERATION_CHECK)
|
manifest = Manifest.load(repository, Manifest.NO_OPERATION_CHECK)
|
||||||
with Cache(repository, manifest) as cache:
|
with Cache(repository, manifest) as cache:
|
||||||
|
@ -260,7 +256,7 @@ def wipe_wrapper(*args):
|
||||||
assert called
|
assert called
|
||||||
|
|
||||||
with Repository(self.repository_path, exclusive=True) as repository:
|
with Repository(self.repository_path, exclusive=True) as repository:
|
||||||
if path_prefix:
|
if remote_repo:
|
||||||
repository._location = Location(self.repository_location)
|
repository._location = Location(self.repository_location)
|
||||||
manifest = Manifest.load(repository, Manifest.NO_OPERATION_CHECK)
|
manifest = Manifest.load(repository, Manifest.NO_OPERATION_CHECK)
|
||||||
with Cache(repository, manifest) as cache:
|
with Cache(repository, manifest) as cache:
|
||||||
|
|
Loading…
Reference in a new issue