#!/usr/bin/env bash # Use this script to safely run the test suite after any database changes. # This must be preferred over `rails test`. stripe_public_key=$(RAILS_ENV='test' bin/rails runner "puts ENV['STRIPE_PUBLISHABLE_KEY']") stripe_secret_key=$(RAILS_ENV='test' bin/rails runner "puts ENV['STRIPE_API_KEY']") oauth2_client_id=$(RAILS_ENV='test' bin/rails runner "puts ENV['OAUTH_CLIENT_ID']") oauth2_client_secret=$(RAILS_ENV='test' bin/rails runner "puts ENV['OAUTH_CLIENT_SECRET']") oidc_client_id=$(RAILS_ENV='test' bin/rails runner "puts ENV['OIDC_CLIENT_ID']") oidc_client_secret=$(RAILS_ENV='test' bin/rails runner "puts ENV['OIDC_CLIENT_SECRET']") if [[ -z "$stripe_public_key" ]]; then read -rp "STRIPE_PUBLISHABLE_KEY is not set. Please input the public key now. > " stripe_public_key " stripe_secret_key " oauth2_client_id " oauth2_client_secret " oidc_client_id " oidc_client_secret