Skip to content

Commit

Permalink
Add comment to export test to help understand the test failure (#78182)
Browse files Browse the repository at this point in the history
## Description
I ran into an issue with test that was very easy to resolve once I
understood the issue, adding a comment block incase someone runs into
this in the future so they can get a general sense of the issue and next
steps.
  • Loading branch information
saponifi3d authored Sep 26, 2024
1 parent 3df2c9d commit 0bac3a4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/sentry/backup/test_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,16 @@ def test_export_filter_orgs_multiple(self):
assert not self.exists(data, OrganizationMember, "user_email", "user_b_only")
assert not self.exists(data, OrganizationMember, "email", "invited-b@example.com")

"""
If this test fails, it's because a newly created model was given an relocation_scope
that is not correctly exporting the models created in backup.py
To fix this you can:
- Add a reference to the organization model
- Remove the model from the relocation scope; using RelocationScope.Excluded
- Reach out to #discuss-open-source on slack for customizations / more detailed support
"""

def test_export_filter_orgs_empty(self):
a = self.create_exhaustive_user("user_a_only")
b = self.create_exhaustive_user("user_b_only")
Expand Down

0 comments on commit 0bac3a4

Please sign in to comment.