Files
unraid-mcp/tests/safety/test_destructive_guards.py
Jacob Magar e87a33ef1a test(safety): add strict no-GraphQL-call and non-destructive regression tests
Two new test classes:

TestNoGraphQLCallsWhenUnconfirmed (parametrized over all 13 destructive actions):
- test_no_graphql_call_without_confirm: make_graphql_request must NOT be
  called when confirm is absent — verifies guard fires before any I/O
- test_no_graphql_call_with_confirm_false: same with explicit confirm=False

TestNonDestructiveActionsNeverRequireConfirm (5 representative non-destructive):
- Regression guard: non-destructive mutations must work without confirm=True;
  prevents accidental over-guarding from breaking normal operations

788 tests passing
2026-03-15 20:16:23 -04:00

26 KiB