code4me2
|
1912be60fb
|
server: add MCP integration tests
Add comprehensive test coverage for MCP functionality using testify.
Test Categories:
1. Client Tests (TestMCPClient*)
- Client initialization and lifecycle
- Environment variable filtering
- Timeout handling
2. Security Tests (TestDangerous*, TestShellInjection*, TestSecure*)
- Command blocklist validation
- Shell metacharacter detection
- Credential filtering
3. Manager Tests (TestMCPManager*, TestToolResult*, TestParallel*)
- Server registration
- Tool caching
- Parallel execution
4. Auto-Enable Tests (TestAutoEnable*)
- Mode: never, always, with_path, if_match
- Conditions: file_exists, env_set
Benchmarks:
- BenchmarkToolExecution, BenchmarkParallelToolExecution
Relates to #7865
|
2025-12-28 15:06:47 -08:00 |