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

chore(data-warehouse): Added end to end tests for stripe jobs #23026

Merged
merged 4 commits into from
Jun 18, 2024

Conversation

Gilbert09
Copy link
Member

Problem

  • On a couple of occasions now, I've broken the end-to-end experience of syncing and querying the Stripe tables

Changes

  • Added end to end tests that runs the whole job sequence for every Stripe table (other sources can be added easily later)
  • Asserts that data is stored and is queryable, also asserts all the expected columns exist
  • Uses mock API responses found from the Stripe API docs (1-row for each table)

Does this work well for both Cloud and self-hosted?

Yup

How did you test this code?

🧙‍♂️

@Gilbert09 Gilbert09 requested a review from EDsCODE June 17, 2024 17:59
Copy link
Member

@EDsCODE EDsCODE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: could clean up test_run_stripe_job in posthog/temporal/tests/external_data which was doing a lot of this but not the entire workflow


@pytest.mark.django_db(transaction=True)
@pytest.mark.asyncio
async def test_stripe_product(team, stripe_product):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: looks parametrizable?

@Gilbert09 Gilbert09 merged commit 24d39cc into master Jun 18, 2024
83 checks passed
@Gilbert09 Gilbert09 deleted the tom/stripe-tests branch June 18, 2024 09:13
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