Skip to content

Add integration tests for proxy endpoint and update test handling - #1041

Merged
greatest0fallt1me merged 5 commits into
CalloraOrg:mainfrom
Achievers-sketch:main
Jul 29, 2026
Merged

Add integration tests for proxy endpoint and update test handling#1041
greatest0fallt1me merged 5 commits into
CalloraOrg:mainfrom
Achievers-sketch:main

Conversation

@Achievers-sketch

Copy link
Copy Markdown
Contributor

Closes #869

Add comprehensive integration tests for the /v1/call/:apiSlugOrId/* proxy route and a TODO tracking file. The new tests (tests/integration/proxy.test.ts) spin up a testcontainers httpd:alpine upstream and wire the proxy router to in-memory mocks for BillingService, RateLimiter, UsageStore, plus an InMemoryApiRegistry and circuit breaker store. Tests cover successful proxying, sub-path handling, header propagation/stripping, usage recording, API key auth failures, registry routing, rate limiting (429), insufficient balance (402), POST idempotency, circuit breaker behavior on repeated failures, upstream unreachable (502), content-type preservation, and Authorization header handling. Also add TODO.md to track remaining test tasks and setup notes (env vars and proxy config used for tests).
@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@Achievers-sketch Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@greatest0fallt1me

Copy link
Copy Markdown
Contributor

Merged into main via admin resolver (-X theirs).

@greatest0fallt1me
greatest0fallt1me merged commit 862b4ff into CalloraOrg:main Jul 29, 2026
1 check passed
@greatest0fallt1me

Copy link
Copy Markdown
Contributor

LGTM ✅ green CI, clean work — merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add integration test for /api/proxy [b#004]

2 participants