|
@@ -4,7 +4,7 @@ from unittest.mock import patch
|
|
|
|
|
|
import pytest
|
|
|
|
|
|
-from ...cache import Cache, LocalCache
|
|
|
+from ...cache import Cache, LocalCache, get_cache_impl
|
|
|
from ...constants import * # NOQA
|
|
|
from ...helpers import Location, get_security_dir, bin_to_hex
|
|
|
from ...helpers import EXIT_ERROR
|
|
@@ -204,9 +204,7 @@ def test_unknown_feature_on_create(archivers, request):
|
|
|
cmd_raises_unknown_feature(archiver, ["create", "test", "input"])
|
|
|
|
|
|
|
|
|
-@pytest.mark.skipif(
|
|
|
- os.environ.get("BORG_CACHE_IMPL") in ("adhocwithfiles", "adhoc"), reason="only works with LocalCache"
|
|
|
-)
|
|
|
+@pytest.mark.skipif(get_cache_impl() in ("adhocwithfiles", "adhoc"), reason="only works with LocalCache")
|
|
|
def test_unknown_feature_on_cache_sync(archivers, request):
|
|
|
# LocalCache.sync checks repo compat
|
|
|
archiver = request.getfixturevalue(archivers)
|
|
@@ -326,9 +324,7 @@ def test_check_cache(archivers, request):
|
|
|
check_cache(archiver)
|
|
|
|
|
|
|
|
|
-@pytest.mark.skipif(
|
|
|
- os.environ.get("BORG_CACHE_IMPL") in ("adhocwithfiles", "adhoc"), reason="only works with LocalCache"
|
|
|
-)
|
|
|
+@pytest.mark.skipif(get_cache_impl() in ("adhocwithfiles", "adhoc"), reason="only works with LocalCache")
|
|
|
def test_env_use_chunks_archive(archivers, request, monkeypatch):
|
|
|
archiver = request.getfixturevalue(archivers)
|
|
|
create_test_files(archiver.input_path)
|