Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 2.47 KB

testing.md

File metadata and controls

55 lines (37 loc) · 2.47 KB

CI Status Coverage Status

Bank Transfer

These are manually resolved via scripts and the admin panel.

This is the easiest way to get unpaid tickets into the system, but there's currently no easy way to test reconciliation.

Wise

This can only be tested with their live environment. See docs/wise.md for details.

Stripe

This is the easiest method to "pay" for a ticket when you're developing. The details for a successful payment are:

  • email: whatever you want
  • card number: 4242 4242 4242 4242
  • expiry: anything in the future, e.g. 12/34
  • cvc: anything, e.g. 123

If you want to test specific modes please check their documentation

Setting it up test stripe

  1. Sign up for stripe. You can skip/cancel through without giving bank details
  2. Get the secret & public api keys https://dashboard.stripe.com/test/apikeys
  3. Set STRIPE_SECRET_KEY & STRIPE_PUBLIC_KEY using these keys
  4. install stripe cli brew install stripe/stripe-cli/stripe
  5. stripe login

If the stripe api version is not the latest

  1. Get an ngrok.com account
  2. install the ngrok client (brew install ngrok/ngrok/ngrok)
  3. ngrok ngrok config add-authtoken <some token> (the ngrok dashboard should show the token)
  4. ngrok http http://localhost:2342 this should show the ngrok forwarding domain for you (something like https://ffff-111-22-333-44.ngrok-free.invalid)
  5. stripe webhook_endpoints create --url https://ffff-111-22-333-44.ngrok-free.invalid/stripe-webhook --api-version 2020-08-27 --enabled-events '*'

If the stripe api version is latest

We are currently using version 2020-08-27 ignore this for no

  1. stripe listen --forward-to localhost:2342/stripe-webhook (leave it running)
  2. set STRIPE_WEBHOOK_KEY to the value returned from the previous (will start whsec_)
  3. you should be able to 'buy' tickets using test cards
  4. the stripe listen terminal should show successful webhook calls

Test users

Create test users with:

./flask dev cfp_data

and enable BYPASS_LOGIN in config. You can then log in using, e.g. /login/admin@test.invalid and navigate to /admin/.