-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
tests(resolve_groups): Clean up the tests #91779
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
Conversation
@@ -240,7 +240,7 @@ def setUp(self): | |||
self.secret = "b3002c3e321d4b7880360d397db2ccfd" | |||
options.set("github-app.webhook-secret", self.secret) | |||
|
|||
def _setup_repo_test(self, project): | |||
def _create_integration_and_send_push_event(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes it clearer what this helper function does.
@@ -576,7 +576,7 @@ def setUp(self): | |||
self.secret = "b3002c3e321d4b7880360d397db2ccfd" | |||
options.set("github-app.webhook-secret", self.secret) | |||
|
|||
def _setup_repo_test(self, project): | |||
def _create_integration_and_send_pull_request_opened_event(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes it clearer what this helper function does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole test we may want to delete, as I believe it may be converted by tests for event_manager or webhooks.
linked_type=GroupLink.LinkedType.pull_request, | ||
linked_id=pr.id, | ||
).exists() | ||
# XXX: Oddly,resolved_in_pull_request doesn't update the group status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlike resolved_in_commit, this function doesn't resolve the group. Maybe it's intentional.
sentry/src/sentry/receivers/releases.py
Lines 224 to 248 in ef23ce0
GroupLink.objects.create( | |
group_id=group.id, | |
project_id=group.project_id, | |
linked_type=GroupLink.LinkedType.pull_request, | |
relationship=GroupLink.Relationship.resolves, | |
linked_id=instance.id, | |
) | |
acting_user: RpcUser | None = None | |
if user_list: | |
acting_user = user_list[0] | |
GroupAssignee.objects.assign( | |
group=group, assigned_to=acting_user, acting_user=acting_user | |
) | |
Activity.objects.create( | |
project_id=group.project_id, | |
group=group, | |
type=ActivityType.SET_RESOLVED_IN_PULL_REQUEST.value, | |
ident=instance.id, | |
user_id=acting_user.id if acting_user else None, | |
data={"pull_request": instance.id}, | |
) | |
record_group_history( | |
group, GroupHistoryStatus.SET_RESOLVED_IN_PULL_REQUEST, actor=acting_user | |
) |
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #91779 +/- ##
==========================================
+ Coverage 78.83% 87.65% +8.82%
==========================================
Files 10333 10336 +3
Lines 586475 586181 -294
Branches 22548 22548
==========================================
+ Hits 462337 513843 +51506
+ Misses 123692 71892 -51800
Partials 446 446 |
* master: (58 commits) link: cleanup link (#91687) ref: create project_id index for organizationonboardingtask (#91918) storybook: smaller last edited (#91875) issues: fix chonk stacktrace alignment (#91891) alert: drop custom alert (#91892) insights: fix bar height (#91895) ref(span-buffer): Move max-memory-percentage to right CLI (#91924) ref(js): Factor button functionality (#91763) tests(resolve_groups): Clean up the tests (#91779) ref(span-buffer): Add backpressure (#91707) fix(nextjs-insights): project id is not passed to explore link (#91920) fix(crons): Floor seconds / microsecond on recorded dateClock (#91890) fix(uptime): Fix bug with the uptime_checks dataset in the events endpoint (#91824) ref: add state-only migration to reflect existing indexes in prod (#91901) ref: remove unnecssary metaclass (#91906) fix(stats): use data category title name (#91913) feat(issues): Add success messages to some actions (#91899) test(taskworker): Lower exec time (#91907) chore(aci): manually add spans for delayed workflow processing (#91908) chore(aci): remove uses of WorkflowFireHistory rollout columns (#91904) ...
This fixes and makes it clearer some of the tests for resolving groups.
This fixes and makes it clearer some of the tests for resolving groups.