@@ -213,7 +213,8 @@ def test_doesnt_update_status_if_not_superuser(self):
213
213
self .updater .run (self .user )
214
214
assert self .sentry_app .status == SentryAppStatus .UNPUBLISHED
215
215
216
- def test_create_service_hook_on_update (self ):
216
+ @patch ("sentry.integrations.utils.metrics.EventLifecycle.record_event" )
217
+ def test_create_service_hook_on_update (self , mock_record ):
217
218
self .create_project (organization = self .org )
218
219
internal_app = self .create_internal_integration (
219
220
name = "Internal" , organization = self .org , webhook_url = None , scopes = ("event:read" ,)
@@ -229,6 +230,17 @@ def test_create_service_hook_on_update(self):
229
230
assert service_hook .url == "https://sentry.io/hook"
230
231
assert service_hook .events == expand_events (["issue" ])
231
232
233
+ # SLO assertions
234
+ assert_success_metric (mock_record = mock_record )
235
+
236
+ # APP_CREATE (success) -> WEBHOOK_UPDATE (success)
237
+ assert_count_of_metric (
238
+ mock_record = mock_record , outcome = EventLifecycleOutcome .STARTED , outcome_count = 2
239
+ )
240
+ assert_count_of_metric (
241
+ mock_record = mock_record , outcome = EventLifecycleOutcome .SUCCESS , outcome_count = 2
242
+ )
243
+
232
244
def test_delete_service_hook_on_update (self ):
233
245
self .create_project (organization = self .org )
234
246
internal_app = self .create_internal_integration (
0 commit comments