Skip to content

Commit

Permalink
Merge pull request #7719 from bket/fix_test
Browse files Browse the repository at this point in the history
Fix failing test on OpenBSD
  • Loading branch information
ThomasWaldmann committed Jul 8, 2023
2 parents 7914e38 + 1074089 commit 4dfce1c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/borg/testsuite/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,12 @@ def test_get_runtime_dir(monkeypatch):
else:
monkeypatch.delenv("XDG_RUNTIME_DIR", raising=False)
monkeypatch.delenv("BORG_RUNTIME_DIR", raising=False)
assert get_runtime_dir() == os.path.join("/run/user", str(os.getuid()), "borg")
uid = str(os.getuid())
assert get_runtime_dir() in [
os.path.join("/run/user", uid, "borg"),
os.path.join("/var/run/user", uid, "borg"),
os.path.join(f"/tmp/runtime-{uid}", "borg"),
]
monkeypatch.setenv("XDG_RUNTIME_DIR", "/var/tmp/.cache")
assert get_runtime_dir() == os.path.join("/var/tmp/.cache", "borg")
monkeypatch.setenv("BORG_RUNTIME_DIR", "/var/tmp")
Expand Down

0 comments on commit 4dfce1c

Please sign in to comment.