opencollective / opencollective-api

Open Collective's API. A GraphQL API powered by Sequelize and PostgreSQL.
https://api.opencollective.com
MIT License
416 stars 265 forks source link

API unit-tests are not isolated #323

Closed sedubois closed 5 years ago

sedubois commented 8 years ago

Several API unit-tests are accessing third-party APIs instead of being isolated (i.e. slower and less reliable). Tested with network disabled.

  1. Root Suite donations.routes.test.js #postPayments Paypal recurring donation success creates a transaction and returns the links
  2. Root Suite donations.routes.test.js #postPayments Paypal recurring donation success executes the billing agreement
  3. Root Suite donations.routes.test.js #postPayments Paypal single donation success creates a transaction and returns the links
  4. Root Suite donations.routes.test.js #postPayments Paypal single donation success executes the billing agreement
  5. Root Suite images.routes.test.js should upload an image to S3
  6. Root Suite images.routes.test.js should upload if the user is not logged in
  7. Root Suite paypal.preapproval.routes.test.js #confirmPreapproval PaymentMethods clean up should delete all other paymentMethods entries in the database to clean up
  8. Root Suite webhooks.routes.test.js success "before each" hook: send webhook
  9. Root Suite webhooks.routes.test.js success Uncaught error outside test suite
  10. Root Suite webhooks.routes.test.js success "before each" hook for "returns an error if the event is not invoice.payment_succeeded"
znarf commented 6 years ago

It's still a problem and a topic today.