fix: resolve per-torrent qb save paths
This commit is contained in:
@@ -50,6 +50,26 @@ class DeploymentPreflightTests(unittest.TestCase):
|
||||
"/data/qb/.archive-control-routes",
|
||||
)
|
||||
|
||||
def test_qb_override_must_map_to_the_same_host_path(self):
|
||||
client = {"Mounts": [
|
||||
{"Type": "bind", "Source": "/srv/fast", "Destination": "/data/fast"},
|
||||
]}
|
||||
qbittorrent = {"Mounts": [
|
||||
{"Type": "bind", "Source": "/srv/fast", "Destination": "/downloads/fast"},
|
||||
]}
|
||||
preflight.require_qb_override_mappings(
|
||||
client, qbittorrent,
|
||||
{"local_path_overrides": {"/downloads/fast": "/data/fast"}},
|
||||
)
|
||||
with self.assertRaisesRegex(preflight.CheckFailure, "host paths differ"):
|
||||
preflight.require_qb_override_mappings(
|
||||
client,
|
||||
{"Mounts": [{
|
||||
"Type": "bind", "Source": "/other", "Destination": "/downloads/fast",
|
||||
}]},
|
||||
{"local_path_overrides": {"/downloads/fast": "/data/fast"}},
|
||||
)
|
||||
|
||||
def test_runs_hardlink_probe_with_qb_and_route_roots(self):
|
||||
completed = __import__("subprocess").CompletedProcess(
|
||||
args=[], returncode=0, stdout="hard-link staging probe passed\n", stderr=""
|
||||
|
||||
Reference in New Issue
Block a user