Skip to content

Commit

Permalink
remove BORG_CACHE_IMPL, we only have one
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasWaldmann committed Sep 17, 2024
1 parent d914298 commit 15ff4b4
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 34 deletions.
9 changes: 0 additions & 9 deletions docs/usage/general/environment.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,6 @@ General:
- ``pyfuse3``: only try to load pyfuse3
- ``llfuse``: only try to load llfuse
- ``none``: do not try to load an implementation
BORG_CACHE_IMPL
Choose the implementation for the clientside cache, choose one of:
- ``adhoc``: builds a non-persistent chunks cache by querying the repo. Chunks cache contents
are somewhat sloppy for already existing chunks, concerning their refcount ("infinite") and
size (0). No files cache (slow, will chunk all input files). DEPRECATED.
- ``adhocwithfiles``: Like ``adhoc``, but with a persistent files cache. Default implementation.
- ``cli``: Determine the cache implementation from cli options. Without special options, will
usually end up with the ``local`` implementation.
BORG_SELFTEST
This can be used to influence borg's builtin self-tests. The default is to execute the tests
at the beginning of each borg command invocation.
Expand Down
4 changes: 0 additions & 4 deletions src/borg/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,6 @@ def _check_upgrade(self, config_path):
raise Exception("%s does not look like a Borg cache." % config_path) from None


def get_cache_impl():
return os.environ.get("BORG_CACHE_IMPL", "adhocwithfiles")


class Cache:
"""Client Side cache"""

Expand Down
20 changes: 0 additions & 20 deletions src/borg/testsuite/archiver/create_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import pytest

from ... import platform
from ...cache import get_cache_impl
from ...constants import * # NOQA
from ...manifest import Manifest
from ...platform import is_cygwin, is_win32, is_darwin
Expand Down Expand Up @@ -526,25 +525,6 @@ def test_create_pattern_intermediate_folders_first(archivers, request):
assert out_list.index("d x/b") < out_list.index("- x/b/foo_b")


@pytest.mark.skipif(get_cache_impl() != "adhoc", reason="only works with AdHocCache")
def test_create_no_cache_sync_adhoc(archivers, request): # TODO: add test for AdHocWithFilesCache
archiver = request.getfixturevalue(archivers)
create_test_files(archiver.input_path)
cmd(archiver, "repo-create", RK_ENCRYPTION)
cmd(archiver, "repo-delete", "--cache-only")
create_json = json.loads(
cmd(archiver, "create", "--no-cache-sync", "--prefer-adhoc-cache", "--json", "test", "input")
)
info_json = json.loads(cmd(archiver, "info", "-a", "test", "--json"))
create_stats = create_json["cache"]["stats"]
info_stats = info_json["cache"]["stats"]
assert create_stats == info_stats
cmd(archiver, "repo-delete", "--cache-only")
cmd(archiver, "create", "--no-cache-sync", "--prefer-adhoc-cache", "test2", "input")
cmd(archiver, "repo-info")
cmd(archiver, "check")


def test_create_archivename_with_placeholder(archivers, request):
archiver = request.getfixturevalue(archivers)
create_test_files(archiver.input_path)
Expand Down
1 change: 0 additions & 1 deletion src/borg/testsuite/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def archiver(tmp_path, set_env_variables):
archiver.patterns_file_path = os.fspath(tmp_path / "patterns")
os.environ["BORG_KEYS_DIR"] = archiver.keys_path
os.environ["BORG_CACHE_DIR"] = archiver.cache_path
# os.environ["BORG_CACHE_IMPL"] = "adhocwithfiles"
os.mkdir(archiver.input_path)
os.chmod(archiver.input_path, 0o777) # avoid troubles with fakeroot / FUSE
os.mkdir(archiver.output_path)
Expand Down

0 comments on commit 15ff4b4

Please sign in to comment.