Commit b4b1666
committed
test(mcp): add comprehensive tests for public MCP API access
- Add 15 tests covering all user stories in mcp_public_test.exs
- User Story 1: Package queries without authentication (6 tests)
- search_packages, get_package, list_packages returns data without auth
- invalid JSON-RPC request handling
- non-existent package error handling
- User Story 2: Tool discovery (3 tests)
- GET /mcp/tools returns tools without authentication
- GET /mcp/server-info returns capabilities with auth status
- All tools include inputSchema for client discovery
- User Story 3: Dependencies (3 tests)
- get_package_metadata returns dependencies without auth
- get_dependency_tree returns structure without auth
- check_compatibility works without authentication
- User Story 4: Documentation (2 tests)
- Package info includes external links without auth
- get_documentation tool accessible without authentication
- Cross-cutting concerns (2 tests)
- Rate limiting test with IP-based tracking
- MCP disabled returns error -32001 with 503 status1 parent 9b6449b commit b4b1666
1 file changed
+452
-0
lines changed
0 commit comments