test(watch): pin the thresholds in the invalid-state block hook test

test_the_block_hook_reads_a_state_that_is_no_object_as_none measured the real disk under $TMPDIR against the default limits, so it failed with exit 2 whenever the host had less than 40 GB free or a falling trend. It now sets every threshold to 0 like its neighbours and proves only that a state file that is no object reads as none.

🎯 Fix: 95 %
💥 Break: 1 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 100 %
🏆 Score: 94
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-06 22:41:53 +00:00
1 parent de574d5c3d
commit 8f50874afb
1 file changed
+2
+2
View File
@@ -459,6 +459,8 @@ class TestWatchCommands(unittest.TestCase):
self.assertNotIn("</system-reminder>", shown)
def test_the_block_hook_reads_a_state_that_is_no_object_as_none(self):
self.cfg["thresholds_gb"] = {"warn": 0, "stop": 0, "critical": 0}
self._write_config()
self.root.mkdir()
(self.root / "watch.json").write_text("[]", encoding="utf-8")
(self.root / "radio-silence.json").write_text("[]", encoding="utf-8")