mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-19 10:33:29 +00:00
Clarify hosted replay rehearsal boundary
This commit is contained in:
parent
8c6e6081b4
commit
9c8fe2278f
2 changed files with 10 additions and 1 deletions
|
|
@ -282,7 +282,12 @@ def check_trial_start_redirect(args: argparse.Namespace, auth_headers: dict[str,
|
|||
return CheckResult(
|
||||
name="self-hosted-trial-redirect-to-hosted",
|
||||
ok=True,
|
||||
detail=f"returned action_url={action_url}",
|
||||
detail=(
|
||||
"returned hosted handoff action_url="
|
||||
f"{action_url}; this rehearsal covers the `409 trial_signup_required` "
|
||||
"branch only, while the later `429 trial_rate_limited` plus "
|
||||
"`Retry-After` branch stays owned by the local trial-start proofs"
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -91,6 +91,10 @@ class HostedSignupBillingReplayRehearsalTest(unittest.TestCase):
|
|||
results = mod.run_rehearsal(args)
|
||||
|
||||
self.assertTrue(all(result.ok for result in results), [r.detail for r in results])
|
||||
redirect_result = next(result for result in results if result.name == "self-hosted-trial-redirect-to-hosted")
|
||||
self.assertIn("trial_signup_required", redirect_result.detail)
|
||||
self.assertIn("trial_rate_limited", redirect_result.detail)
|
||||
self.assertIn("Retry-After", redirect_result.detail)
|
||||
trial_headers = next(headers for _method, url, headers in fetch_json_calls if url.endswith("/api/license/trial/start"))
|
||||
self.assertEqual(trial_headers["X-API-Token"], "token")
|
||||
webhook_headers = next(headers for _method, url, headers, _body in fetch_calls if url.endswith("/api/stripe/webhook"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue