Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscription tests #6

Merged
merged 20 commits into from
Apr 22, 2024
Merged

Subscription tests #6

merged 20 commits into from
Apr 22, 2024

Conversation

qianl15
Copy link
Member

@qianl15 qianl15 commented Apr 18, 2024

This PR adds basic tests and linter for our subscription app.

  • Configured linter rule to demonstrate the usage of DBOS recommended settings.
  • Added unit tests to make sure our CORS setting is correct for our website.
  • Added a staging test to make sure we can correctly upgrade/downgrade users when they subscribe/unsubscribe from Stripe. Whenever we add/cancel subscriptions, Stripe sends events to our webhook hosted on staging cluster, the webhook in turn talks to staging to enforce entitlements.
  • Created new Github workflows for both tests. Staging test runs every 6 hours.
  • Currently, we don't have a good solution to tell if a user is pro or free tier. I use "link db" to differentiate different tiers.

Next step:

  • Add a user info endpoint in DBOS Cloud to return user subscription status.
  • Use refresh token instead of our current login flow.

@qianl15 qianl15 marked this pull request as ready for review April 19, 2024 18:34
@qianl15 qianl15 merged commit 79505b4 into main Apr 22, 2024
1 check passed
@qianl15 qianl15 deleted the qian/subscription-tests branch April 22, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants