You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(e2e): add launcher-lifecycle gate driving a real HTTP MCP fixture
Closes the gap unit tests can't: proves a built mcpproxy binary actually
spawns a self-launched HTTP MCP server, completes the MCP handshake,
serves tools/list through the proxy, and reaps the child cleanly on
disable / restart / shutdown.
What's new:
- test/launcher-server/main.go — minimal HTTP MCP fixture (~220 LOC).
Implements initialize, tools/list (returns a "ping" tool),
tools/call, plus 405-on-GET so mcp-go's StreamableHTTP transport
falls back to POST-only. Exits cleanly on SIGTERM (5s shutdown).
Heartbeat to stdout proves the per-server log pump works.
- test/e2e-config.template.json — new "launcher-test" upstream
({protocol: http, command: ./test/launcher-server/launcher-server,
url: http://127.0.0.1:39933/mcp, launcher_wait_timeout: 10s}).
- scripts/test-api-e2e.sh:
* Prereq step now `go build`s the fixture before booting mcpproxy.
* New wait_for_launcher_test_server() polls /servers until
launcher-test reports connected.
* New test_launcher_lifecycle() runs six sub-assertions:
1. tools/list returns the fixture's "ping" tool through the
proxy (proves Spawn -> WaitForURL -> connectHTTP -> MCP
initialize -> ListTools end-to-end).
2. pgrep finds the child process by argv.
3. POST /servers/launcher-test/restart yields a different PID.
4. POST /servers/launcher-test/disable reaps the child within 8s.
5. POST /servers/launcher-test/enable respawns it with a fresh
PID.
6. /servers/launcher-test/logs?tail=200 contains the launcher
banner or fixture stdout.
* cleanup() pkill's any leaked launcher-server processes so a
failure mid-test doesn't taint the next run.
.gitignore: ignore the built fixture binary
(/test/launcher-server/launcher-server). Source stays tracked.
Refs spec: specs/046-local-launcher-for-http-sse/plan.md (Phase 2 e2e
follow-up that was listed as outstanding in the PR test plan).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments