mirror of https://github.com/borgbackup/borg.git
fix test part that only works with LocalCache
This commit is contained in:
parent
25a7a1443a
commit
5136fa8fe3
|
@ -277,6 +277,7 @@ def test_unknown_mandatory_feature_in_cache(archivers, request):
|
||||||
repository._location = Location(archiver.repository_location)
|
repository._location = Location(archiver.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:
|
||||||
|
is_localcache = isinstance(cache, LocalCache)
|
||||||
cache.begin_txn()
|
cache.begin_txn()
|
||||||
cache.cache_config.mandatory_features = {"unknown-feature"}
|
cache.cache_config.mandatory_features = {"unknown-feature"}
|
||||||
cache.commit()
|
cache.commit()
|
||||||
|
@ -295,6 +296,7 @@ def test_unknown_mandatory_feature_in_cache(archivers, request):
|
||||||
with patch.object(LocalCache, "wipe_cache", wipe_wrapper):
|
with patch.object(LocalCache, "wipe_cache", wipe_wrapper):
|
||||||
cmd(archiver, "create", "test", "input")
|
cmd(archiver, "create", "test", "input")
|
||||||
|
|
||||||
|
if is_localcache:
|
||||||
assert called
|
assert called
|
||||||
|
|
||||||
with Repository(archiver.repository_path, exclusive=True) as repository:
|
with Repository(archiver.repository_path, exclusive=True) as repository:
|
||||||
|
|
Loading…
Reference in New Issue