Files
purchases-ios/Sources/Networking/HTTPClient
Antonio PallaresandCursor 30317dc720 feat(remote-config): force the config kill-switch via query param in E2E tests (#7317)
* refactor: model ForceServerErrorStrategy interception as a single Action enum

The two closures (`fakeResponseWithoutPerformingRequest` and
`shouldForceServerError`) encoded an implicit precedence rule that only lived in
a doc comment. A single closure returning `Action` makes each request resolve to
exactly one outcome.

Co-authored-by: Cursor <cursoragent@cursor.com>

* refactor: log the destination URL and faked status code when forcing errors

Both messages previously identified only the request, so a faked 404 and a faked
204 looked identical, and there was no way to tell whether a forced error routed
to the 502 endpoint or to an unreachable host.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(remote-config): force the config kill-switch via force_killswitch query param

The Maestro E2E app faked a local 404 for /v1/config, which never exercised the
backend's real kill-switch response. RevenueCat/khepri#23311 adds an opt-in
`force_killswitch=true` query param that serves the actual 400
CONFIG_ENDPOINT_DISABLED for that request only.

`serverErrorURL` cannot be reused here because it replaces the whole URLRequest,
dropping the method, auth headers and body the endpoint needs.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 16:14:21 +02:00
..