oncall-engine/engine/apps/slack/tests
Innokentii Konstantinov 94219c25bb
Introduce slash command matcher (#4717)
With the Unified Slack app we now have two ways of calling commands.
1. Legacy one when command invoked directly: /escalate
2. Unified one: /grafana escalate
On top of that we have different slach commands for each environment:
/escalate-local, /escalate-dev, etc. It was leading to a weird command
to escalate via Unified App in dev u need to type: /grafana-dev
escalate-develop.

To support both, I introduced a matcher function for SlashCommandRoutes.
It allows to simplify handling of such cases without complex workarounds
in an EventAPIEndpoint.


# What this PR does

## Which issue(s) this PR closes

Related to [issue link here]

<!--
*Note*: If you want the issue to be auto-closed once the PR is merged,
change "Related to" to "Closes" in the line above.
If you have more than one GitHub issue that this PR closes, be sure to
preface
each issue link with a [closing
keyword](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue).
This ensures that the issue(s) are auto-closed once the PR has been
merged.
-->

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] Added the relevant release notes label (see labels prefixed w/
`release:`). These labels dictate how your PR will
    show up in the autogenerated release notes.
2024-07-24 09:53:06 +00:00
..
tasks fix slack API rate limit errors in send_message_to_thread_if_bot_not_in_channel task (#3803) 2024-01-31 13:42:52 -05:00
test_scenario_steps Support stack header from chatops-proxy (#4578) 2024-07-19 10:08:52 +00:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
conftest.py Fix handling Slack rate limits (#2991) 2023-09-07 11:25:29 +00:00
factories.py Pass all integration labels down to alert groups (#3302) 2023-11-08 14:04:58 +00:00
test_installation.py Unified Slack app reinstall (#4682) 2024-07-19 11:53:06 +00:00
test_interactive_api_endpoint.py Support stack header from chatops-proxy (#4578) 2024-07-19 10:08:52 +00:00
test_parse_slack_usernames.py Schedules alpha fixes (#541) 2022-09-21 11:19:59 +01:00
test_populate_slack_channels.py Improve Slack error handling (#3000) 2023-09-12 09:49:16 +00:00
test_reset_slack.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
test_slack_client.py Avoid retrying to update Slack log message if cant_update_message (#4329) 2024-05-09 16:16:53 +00:00
test_slack_formatter.py Fix alert group rendering (#3424) 2023-11-24 15:39:37 +00:00
test_slack_message.py Update deep link URL for Slack messages (#4317) 2024-05-09 10:18:48 +00:00
test_slack_renderer.py Show incident button first when alert group is acknowledged (#4642) 2024-07-10 15:01:01 +00:00
test_slash_command.py Introduce slash command matcher (#4717) 2024-07-24 09:53:06 +00:00
test_user_group.py Fix update slack group to not raise if group is not found (#4423) 2024-05-30 11:27:25 +00:00
test_utils.py Fix post message to slack channel (#3701) 2024-01-17 13:05:36 +00:00