From 9e9c2206083289ce09dfb002ecd159dc1f359be3 Mon Sep 17 00:00:00 2001 From: "Tony (eazye19)" Date: Wed, 29 Jul 2026 20:18:36 -0700 Subject: [PATCH] chore(tests): drop accidental temp guard probe file tests/test_zz_guard_probe_tmp.py was a throwaway verification probe that was swept into the PR #43299 salvage commit by mistake (and one of its shell=True cases fails by design of the probe). The durable regression coverage lives in tests/test_live_system_guard.py. --- tests/test_zz_guard_probe_tmp.py | 34 -------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 tests/test_zz_guard_probe_tmp.py diff --git a/tests/test_zz_guard_probe_tmp.py b/tests/test_zz_guard_probe_tmp.py deleted file mode 100644 index 63ed7d553e5..00000000000 --- a/tests/test_zz_guard_probe_tmp.py +++ /dev/null @@ -1,34 +0,0 @@ -"""Ad-hoc verification: gateway-kill-shaped commands must still be blocked.""" -import subprocess - -import pytest - - -@pytest.mark.parametrize( - "cmd", - [ - ["pkill", "-f", "hermes-gateway"], - ["killall", "hermes-gateway"], - ["bash", "-c", "pkill -f hermes-gateway"], - ["env", "X=1", "pkill", "-f", "hermes-gateway"], - ["sudo", "pkill", "-f", "hermes-gateway"], - ["nohup", "pkill", "-f", "hermes-gateway"], - "pkill -f hermes-gateway", - ], -) -def test_gateway_kill_still_blocked(cmd): - with pytest.raises(RuntimeError, match="live-system guard"): - subprocess.run(cmd) - - -def test_innocent_argv_not_blocked(tmp_path): - p = tmp_path / "skill" - p.write_text("hello") - r = subprocess.run(["cat", str(p)], capture_output=True, text=True) - assert r.stdout == "hello" - - -@pytest.mark.parametrize("cmd", ["pkill -f hermes-gateway", "bash -c \"pkill -f hermes-gateway\""]) -def test_gateway_kill_shell_true_blocked(cmd): - with pytest.raises(RuntimeError, match="live-system guard"): - subprocess.run(cmd, shell=True)