oncall-engine/engine/apps/api/tests
Joey Orlando f905ac5246
Updates to POST /direct_paging internal API endpoint to support Grafana Incident use-cases (#3232)
# What this PR does

- Add a new column, `grafana_incident_id`, to the `AlertGroup` model.
For now this is really just needed to determine if the Alert Group was
created, via a Direct Page, that originated from Grafana Incident.
- I understand that these IDs may be cluster specific. For now we will
not need to make OnCall backend -> Incident API calls. Should we need to
start doing this we will likely need to start syncing the Incident
plugin's provisioned API url into the `organization` in OnCall, such
that we make the API call to the right Incident backend.
- Add two new optional request body parameters to `POST /direct_paging`,
`source_url` and `grafana_incident_id`
- `source_url` - will easily allow Grafana Incident to specify the URL
to the Incident and have this populate the "Source" button
- `grafana_incident_id` - Grafana Incident can specify this such that we
have a link back to Incident (+ we know that the Alert Group was
generated from Incident)
- Hide the "Declare Incident" button in the UI if the Alert Group was
generated from Grafana Incident

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-11-01 17:19:44 -04:00
..
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
conftest.py Improve Slack error handling (#3000) 2023-09-12 09:49:16 +00:00
test_alert_group.py address some minor direct paging backend issues (#3208) 2023-10-27 20:47:00 +00:00
test_alert_receive_channel.py Add labels implementation for integration (#3014) 2023-10-20 07:30:11 +00:00
test_alert_receive_channel_template.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
test_auth.py Reworked slack login pipeline errors (#2526) 2023-07-18 13:31:11 +00:00
test_channel_filter.py Fix channel filter endpoint (#3192) 2023-10-25 12:33:05 +00:00
test_custom_button.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
test_escalation_chain.py Allow changing team for escalation chains (#1658) 2023-03-30 10:43:00 +01:00
test_escalation_policy.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
test_features.py remove two unused feature flags (#2734) 2023-08-02 14:07:47 -04:00
test_integration_heartbeat.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
test_labels.py Permissions for labels (#3173) 2023-10-23 11:03:51 +00:00
test_live_settings.py Telegram long polling (#2250) 2023-08-24 09:12:24 +02:00
test_oncall_shift.py Disable updates for API/terraform shifts in internal API (#3224) 2023-10-31 15:08:07 +00:00
test_organization.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
test_paging.py Updates to POST /direct_paging internal API endpoint to support Grafana Incident use-cases (#3232) 2023-11-01 17:19:44 -04:00
test_permissions.py Permissions for labels (#3173) 2023-10-23 11:03:51 +00:00
test_preview_template_options.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
test_public_api_tokens.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
test_resolution_note.py Resolution note source mobile app (#3174) 2023-10-20 15:22:45 +01:00
test_route_regex_debugger.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
test_schedule_export.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
test_schedules.py Add responders improvements (#3128) 2023-10-27 12:12:07 -04:00
test_set_general_log_channel.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
test_shift_swaps.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
test_slack_channels.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
test_slack_team_settings.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
test_team.py few add responders patches (#3220) 2023-10-31 11:18:33 -04:00
test_telegram_channel.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
test_user.py Add responders improvements (#3128) 2023-10-27 12:12:07 -04:00
test_user_groups.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
test_user_notification_policy.py Fix duplicate orders for user notification policies (#2278) 2023-06-21 11:13:56 +00:00
test_user_schedule_export.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
test_webhook_presets.py Add webhook presets (#2996) 2023-09-27 07:22:52 -06:00
test_webhooks.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00