• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 22948654878

11 Mar 2026 10:43AM UTC coverage: 63.947% (+0.06%) from 63.889%
22948654878

push

github

web-flow
Fix deterministic E2E proxy SSE endpoint rewrite tests (#4093)

Fix deterministic E2E proxy SSE endpoint rewrite test failures

These SSE endpoint rewrite tests were orphaned from CI until the matrix
rebalance (#4074), then had stale flags fixed (#4080), but have never
actually passed. Four root causes are addressed:

1. GenerateMCPServerURL omits /sse for remote SSE URLs with empty path,
   causing waitForInitializeSuccess to GET / instead of /sse (404).
2. getSSERewriteConfig reads X-Forwarded-* from the outbound request
   which has auto-injected headers from SetXForwarded(), converting
   relative endpoint URLs into absolute ones with the proxy's own host.
3. Test 3 mock server lacks a 404 fallback for non-/sse paths.
4. Test 4 (OSV + endpoint-prefix) fails due to #3372; skip it.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

30 of 30 new or added lines in 3 files covered. (100.0%)

4 existing lines in 2 files now uncovered.

47610 of 74452 relevant lines covered (63.95%)

73.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

79.79
/pkg/transport/proxy/httpsse/http_proxy.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc