Skip to content

test(stripe_controller): add webhook endpoint tests#3308

Open
laraujo7 wants to merge 2 commits intoLogflare:mainfrom
laraujo7:la/stripe_controller-test
Open

test(stripe_controller): add webhook endpoint tests#3308
laraujo7 wants to merge 2 commits intoLogflare:mainfrom
laraujo7:la/stripe_controller-test

Conversation

@laraujo7
Copy link
Copy Markdown
Contributor

Also fix get_payment_method_by/1 typespec to include nil return and minor formatting cleanup

@laraujo7 laraujo7 force-pushed the la/stripe_controller-test branch 3 times, most recently from 5630daa to 62587b9 Compare March 31, 2026 12:40
assert Billing.get_billing_account_by(stripe_customer: ba.stripe_customer).id == ba.id

assert Billing.get_billing_account_by(stripe_customer: ba.stripe_customer).lifetime_plan ==
ba.lifetime_plan
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why compare on this field specifically? Why not do a before/after struct comparison?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doing so with a struct comparison would be more comprehensive as well

Copy link
Copy Markdown
Contributor

@nelsonmestevao nelsonmestevao Apr 2, 2026

Choose a reason for hiding this comment

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

Wouldn't the id be enough though? I can do a struct comparison if you see it as better in this case 🙏

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I did full struct comparison and extracted the util TestUtils.reset_associations/1 🙏

@nelsonmestevao nelsonmestevao force-pushed the la/stripe_controller-test branch 3 times, most recently from 457df94 to 531a2a0 Compare April 7, 2026 11:05
assert Billing.get_billing_account_by(stripe_customer: ba.stripe_customer).id == ba.id

assert Billing.get_billing_account_by(stripe_customer: ba.stripe_customer).lifetime_plan ==
ba.lifetime_plan
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I did full struct comparison and extracted the util TestUtils.reset_associations/1 🙏

@nelsonmestevao nelsonmestevao force-pushed the la/stripe_controller-test branch 5 times, most recently from 7265a0a to 2d76d47 Compare April 8, 2026 19:19
@laraujo7 laraujo7 force-pushed the la/stripe_controller-test branch from 90f3851 to b76f987 Compare April 9, 2026 08:42
@laraujo7 laraujo7 force-pushed the la/stripe_controller-test branch 3 times, most recently from 89bd6a1 to d933fca Compare April 9, 2026 08:51
Revert 'query/cache tuning changes' (Logflare#3348) (Logflare#3354)

* Revert "chore: query/cache tuning for hot query paths (Logflare#3348)"

This reverts commit 93157ab.

* version bump
@laraujo7 laraujo7 force-pushed the la/stripe_controller-test branch from d933fca to 63d8f97 Compare April 9, 2026 08:52
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.

3 participants