Commit dd4e207
committed
test(payments): keep Stripe webhook creation out of CI runs
With real Stripe test credentials now present in CI, the previously
skipped payment tests started running - and every path that registers a
webhook endpoint against the real Stripe API died with "Can not create
the Stripe Webhook": Stripe rejects non-publicly-accessible URLs
server-side (verified empirically: WebhookEndpoint::create with the CI
APP_URL fails with "Invalid URL: URL must be publicly accessible"), so
no localhost environment can ever exercise webhook creation, regardless
of local configuration.
Two treatments:
- OAuth2SummitOrdersApiTest: the payment profile is built with
pre-seeded webhook data (set_webhooks + test_web_hook_secret from the
TEST_STRIPE_WEBHOOK_SECRET secret), the factory's escape hatch for
pre-existing webhooks - activate()->buildWebHook() then short-circuits
on existsWebHook() and never calls Stripe. This lets
testReserveWithActivePaymentProfile actually exercise the paid
reservation flow (real PaymentIntent in test mode) in CI.
- OAuth2PaymentGatewayProfileApiTest (add/update/delete): profile
creation through the API always registers a webhook endpoint (the API
validation rules accept no pre-seeded webhook data), so these tests
are environment-gated: they now also skip when APP_URL is localhost,
with the real reason documented. They run only against an environment
with a publicly routable URL.1 parent 09662ff commit dd4e207
2 files changed
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
165 | 168 | | |
166 | 169 | | |
167 | 170 | | |
| |||
202 | 205 | | |
203 | 206 | | |
204 | 207 | | |
205 | | - | |
206 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
207 | 213 | | |
208 | 214 | | |
209 | 215 | | |
| |||
276 | 282 | | |
277 | 283 | | |
278 | 284 | | |
279 | | - | |
280 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
281 | 290 | | |
282 | 291 | | |
283 | 292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
79 | 84 | | |
80 | 85 | | |
81 | 86 | | |
| |||
0 commit comments