/opt/docker/stacks/<app> is the catalog's template copy and stays after a clean remove, so every remove printed it as a leftover (2026-10-24, 9202).
This commit is contained in:
1 parent
7de554e954
commit
5e196e1ab8
4 files changed
+21
-1
No files matched your search
@@ -454,6 +454,19 @@ class BoxWalkTargets(unittest.TestCase):
|
||||
self.assertEqual(len(made), 1)
|
||||
self.assertNotIn("scratch_hdd ", made[0] + " ") # the drive root itself is never mkdir-ed
|
||||
|
||||
def test_remove_looks_for_the_install_record_not_the_template_folder(self):
|
||||
"""/opt/docker/stacks/<app> is the catalog's template copy and stays after a clean remove; app.yaml is the
|
||||
install's record. RED-PROOF: check the folder again → fails."""
|
||||
bw = self.load({"BASE": "https://192.0.2.1"})
|
||||
seen = []
|
||||
with mock.patch.object(bw, "ctl", return_value=("200", {"ok": True})), \
|
||||
mock.patch.object(bw, "stack", return_value={"deployed": False}), \
|
||||
mock.patch.object(bw, "guest", side_effect=lambda script, timeout=600: seen.append(script) or ""), \
|
||||
mock.patch.object(bw, "say"), mock.patch.object(bw.time, "sleep"):
|
||||
bw.remove("qbittorrent")
|
||||
check = [c for c in seen if "/opt/docker/stacks/" in c]
|
||||
self.assertTrue(check and "/opt/docker/stacks/qbittorrent/app.yaml" in check[-1], seen)
|
||||
|
||||
def test_an_unknown_target_is_refused(self):
|
||||
with self.assertRaises(SystemExit):
|
||||
self.load({"TARGET": "ep0"})
|
||||
|
||||
Reference in new issue
Block a user