|
Option C Tools
|
Classes | |
| class | TestAllNineToolsEndToEnd |
| class | TestRateLimiting |
| class | TestPolicyEnforcement |
| class | TestValidationFailure |
| class | TestT09ContextPoisoning |
| class | TestRedactionIntegration |
Functions | |
| McpMetrics | _isolated_metrics () |
| tuple[ServerState, McpAuditLogger] | _make_state (Path tmp_path, str sandbox_output='{"tool":"test", "exit_code":0}', int sandbox_exit_code=0, str profile="default", bool safe_mode=False, int rate_limit=30, str session_id="integration-test-session") |
Purpose
-------
Integration tests for the oct-mcp six-layer pipeline.
Responsibilities
----------------
- Verify all 9 tools end-to-end via mock sandbox.
- Verify T-09 (context poisoning) and T-11 (prompt injection) defences.
- Verify rate limiting, combined policy + validator, and audit records.
Diagnostics
-----------
Domain: MCP-TESTS
Levels:
L2 — test lifecycle
L3 — assertion details
L4 — deep tracing
Contracts
---------
- Tests use mock sandbox and ``tmp_path``; no real subprocess is
spawned.
|
protected |
McpMetrics on a private CollectorRegistry — avoids ``Duplicated timeseries`` collisions across tests.
Definition at line 50 of file test_mcp_integration.py.
|
protected |
Construct a ServerState with a mock sandbox for integration tests.
Definition at line 59 of file test_mcp_integration.py.