Commit d80270d
test(mcp): comprehensive test suite — 95.8% coverage with race, integration, protocol tests
Add 6 test files covering all MCP server code paths:
- tools_internal_test.go: 27 direct tests for internal functions
- server_integration_test.go: 5 HTTP auth middleware tests
- concurrency_test.go: 3 race condition tests (270+ goroutines)
- protocol_test.go: 11 MCP protocol round-trip tests via in-process client
- tools_test.go: 12 edge-case SQL tests (CTEs, window functions, injections)
- server_test.go: 3 server lifecycle tests (start, shutdown, port-in-use)
- scripts/mcp-e2e-test.sh: JSON-RPC E2E shell script
Also fix go vet in Taskfile to exclude CGo-dependent pkg/cbinding.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent ffb1712 commit d80270d
9 files changed
Lines changed: 2998 additions & 3 deletions
File tree
- docs/superpowers/plans
- pkg/mcp
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
0 commit comments