Skip to content

Commit 0bc57bf

Browse files
jeremyederAmbient Code Botclaude
authored
test: add comprehensive E2E tests for MCP server (#39)
* test: add comprehensive E2E tests for MCP server Add test_server_e2e.py with full coverage of all 26 MCP tools: Session Management: - list_sessions, get_session, create_session, create_session_from_template - delete_session, restart_session, clone_session, update_session Observability: - get_session_logs, get_session_transcript, get_session_metrics Labels: - label_resource, unlabel_resource, list_sessions_by_label - bulk_label_resources, bulk_unlabel_resources Bulk Operations: - bulk_delete_sessions, bulk_stop_sessions, bulk_restart_sessions - bulk_delete_sessions_by_label, bulk_stop_sessions_by_label - bulk_restart_sessions_by_label Cluster Management: - list_clusters, whoami, switch_cluster, login Test Infrastructure: - MockHTTPClient class with response matching and call verification - make_response helper for creating mock httpx responses - Fixtures for cluster config, settings, and HTTP client Test Coverage Includes: - Success and error path testing - Dry-run mode verification - Confirmation requirement enforcement for destructive operations - Input validation testing (invalid project, template, etc.) - Complete session lifecycle workflow simulation - Edge cases (empty lists, no matches, partial failures) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ci): apply ruff formatting to test_server_e2e.py Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Ambient Code Bot <bot@ambient-code.local> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent adc3fb0 commit 0bc57bf

1 file changed

Lines changed: 1115 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)