1
0
mirror of https://github.com/TryGhost/Ghost.git synced 2024-12-19 08:31:43 +03:00
Ghost/ghost/stripe/test
Naz af4d7b4938 Fixed failing migration requests when client runs in a test env
no issue

- When Ghost is running in a test environment, it is configured with an invalid Stripe key that looks like `sk_test***`. In this case the migrations try runnig creating request to Stripe, which fail. The failures pollute the output, which makes other valid errors lost.
- An example of such error log is following:
```
Invalid API Key provided: sk_test_******ripe

----------------------------------------

Error: Invalid API Key provided: sk_test_******ripe
    at res.toJSON.then.StripeAPIError.message (/home/naz/Workspace/Ghost/Ghost/node_modules/stripe/lib/StripeResource.js:214:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
```
- There doesn't seem to be a good reason to do migrations in the test environment. Skipping them as a special case to fix the output pollution problem seems like a right solution
2022-04-05 21:36:22 +12:00
..
unit/lib Fixed failing migration requests when client runs in a test env 2022-04-05 21:36:22 +12:00
utils Moved members-stripe-service -> stripe 2022-01-18 10:25:37 +02:00
.eslintrc.js Moved members-stripe-service -> stripe 2022-01-18 10:25:37 +02:00
hello.test.js Moved members-stripe-service -> stripe 2022-01-18 10:25:37 +02:00