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

stacklok / toolhive / 18651008938

20 Oct 2025 11:47AM UTC coverage: 46.565% (-0.02%) from 46.584%
18651008938

push

github

web-flow
test(runner): add unit tests for token-exchange middleware integration (Priority 1) (#2227)

* test(runner): add unit tests for token-exchange middleware integration

Add Priority 1 (Core Integration) unit tests for token-exchange middleware in pkg/runner/config_builder.go.

These tests:
- Verify middleware is not added when tokenExchangeConfig is nil
- Verify middleware is added and correctly ordered (auth → token-exchange → MCP parser)
- Validate middleware chain integrity

Fixes: #2149

Signed-off-by: Mohamed Fawas <fawastmh@gmail.com>

* test(runner): add core integration tests for token-exchange middleware

This commit adds Priority 1 (Core Integration) tests for the token-exchange middleware in pkg/runner/config_builder_test.go.

Changes include:
- Verified middleware is not added when `tokenExchangeConfig` is nil.
- Verified middleware order (auth → token-exchange → mcp parser) when config is provided.
- Confirmed that middleware parameters are populated and match the provided `tokenexchange.Config`.

This improves coverage and ensures correct integration behavior between authentication and token-exchange components.

Signed-off-by: Mohamed Fawas <fawastmh@gmail.com>

---------

Signed-off-by: Mohamed Fawas <fawastmh@gmail.com>

17978 of 38608 relevant lines covered (46.57%)

15.62 hits per line

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

81.62
/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