Skip to content

test(auth): Cover stale pending invitation sessions - #126496

Merged
evanpurkhiser merged 1 commit into
masterfrom
git/test-auth-cover-stale-pending-invitation-sessions
Oct 7, 2026
Merged

evanpurkhiser merged 1 commit into
masterfrom
git/test-auth-cover-stale-pending-invitation-sessions

Conversation

@evanpurkhiser

Copy link
Copy Markdown
Member

MFA enrollment stopped reading pending invitations from the session in #126057, removing the enrollment tests that covered stale sessions. This follow-up exercises ApiInviteHelper.from_session directly in the existing helper test suite.

The tests cover a deleted invite member returning None and logging "Invalid pending invite cookie", a rotated token failing request validation, and an existing organization member resolving to their own membership. The existing-member case also verifies the "User already org member" log and removal of the stale pending invite while preserving the user's membership.

Validation: all 11 tests in tests/sentry/api/test_invite_helper.py passed; pre-commit checks passed.

@evanpurkhiser
evanpurkhiser requested a review from a team as a code owner October 5, 2026 19:35
@evanpurkhiser
evanpurkhiser enabled auto-merge (squash) October 5, 2026 19:49
@evanpurkhiser
evanpurkhiser force-pushed the git/test-auth-cover-stale-pending-invitation-sessions branch from 6564619 to 14a1527 Compare October 5, 2026 20:08
@sentry

sentry Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 612 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

@evanpurkhiser
evanpurkhiser force-pushed the git/test-auth-cover-stale-pending-invitation-sessions branch from 14a1527 to 16fc891 Compare October 5, 2026 21:49
Keep stale-session coverage at the invite helper layer after MFA enrollment
stopped reading pending invitations from the session.
@evanpurkhiser
evanpurkhiser force-pushed the git/test-auth-cover-stale-pending-invitation-sessions branch from 16fc891 to 337401e Compare October 7, 2026 15:24
@evanpurkhiser
evanpurkhiser merged commit 7dac238 into master Oct 7, 2026
64 checks passed
@evanpurkhiser
evanpurkhiser deleted the git/test-auth-cover-stale-pending-invitation-sessions branch October 7, 2026 15:35
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