Convert and mark some more superuser -> staff tests #107803
Open
michelletran-sentry wants to merge 1 commit intomasterfrom
Open
Convert and mark some more superuser -> staff tests #107803michelletran-sentry wants to merge 1 commit intomasterfrom
michelletran-sentry wants to merge 1 commit intomasterfrom
Conversation
Converts 6 superuser-only tests (where no staff equivalent exists) to use staff mode
and adds @override_options({"staff.ga-rollout": False/True}) decorators to all tests
to ensure compatibility with staff mode.
Changes:
- Converted 5 superuser-only tests to staff in test_sentry_app_details.py:
- test_staff_can_set_publish_request_inprogress_status
- test_staff_delete_unpublished_app
- test_staff_delete_unpublished_app_with_installs
- test_staff_cannot_delete_published_app
- test_staff_cannot_delete_partner_apps
- Converted 1 superuser-only test to staff in test_sentry_apps_stats.py:
- test_per_page
- Updated DeleteSentryAppDetailsTest setUp to use staff user by default:
- Creates staff user as org member in setUp
- Logs in as staff instead of superuser
- Simplifies individual test methods (no repeated membership creation)
- Added decorators to ALL tests (47 total):
- False decorator on superuser tests in duplicate pairs
- True decorator on all other tests (staff and general tests)
This ensures all tests work with staff.ga-rollout=True while maintaining test
coverage during the transition. Superuser tests in duplicate pairs can be easily
identified and removed in Phase 2.
Part of the effort to remove the staff.ga-rollout flag and migrate to staff-only mode.
Co-Authored-By: Claude <noreply@anthropic.com>
9486201 to
3b94702
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Similar to #107368, where I'm trying to convert and mark tests that depends on superusers who should be migrated to staff. This ensures all tests work with staff.ga-rollout=True while maintaining test coverage during the transition. Superuser tests in duplicate pairs can be easily identified and removed later. This is part of the effort to remove the staff.ga-rollout flag and migrate to staff-only mode.
Changes: