chore: grafana-irm command (#4762)
This commit is contained in:
parent
ce45286a48
commit
1faffb3dae
3 changed files with 5 additions and 5 deletions
|
|
@ -38,4 +38,4 @@ class SlashCommand:
|
|||
|
||||
@property
|
||||
def is_grafana_command(self):
|
||||
return self.command in ["grafana", "grafana-dev", "grafana-ops", "grafana-prod"]
|
||||
return self.command in ["grafana-irm", "grafana-irm-dev", "grafana-irm-ops", "grafana-irm-prod"]
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ def test_grafana_escalate(
|
|||
"channel_name": "test",
|
||||
"user_id": slack_user_identity.slack_id,
|
||||
"user_name": "Steve",
|
||||
"command": "/grafana",
|
||||
"command": "/grafana-irm",
|
||||
"text": "escalate",
|
||||
"response_url": "https://hooks.slack.com/commands/1234/5678",
|
||||
"trigger_id": "13345224609.738474920.8088930838d88f008e0",
|
||||
|
|
@ -349,7 +349,7 @@ def test_grafana_escalate_with_org_from_chatops_proxy_defines_org(
|
|||
"channel_name": "test",
|
||||
"user_id": slack_user_identity.slack_id,
|
||||
"user_name": "Steve",
|
||||
"command": "/grafana",
|
||||
"command": "/grafana-irm",
|
||||
"text": "escalate",
|
||||
"response_url": "https://hooks.slack.com/commands/1234/5678",
|
||||
"trigger_id": "13345224609.738474920.8088930838d88f008e0",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from apps.slack.slash_command import SlashCommand
|
|||
|
||||
def test_parse():
|
||||
payload = {
|
||||
"command": "/grafana",
|
||||
"command": "/grafana-irm",
|
||||
"text": "escalate",
|
||||
"trigger_id": "trigger_id",
|
||||
"user_id": "user_id",
|
||||
|
|
@ -11,7 +11,7 @@ def test_parse():
|
|||
"api_app_id": "api_app_id",
|
||||
}
|
||||
slash_command = SlashCommand.parse(payload)
|
||||
assert slash_command.command == "grafana"
|
||||
assert slash_command.command == "grafana-irm"
|
||||
assert slash_command.args == ["escalate"]
|
||||
assert slash_command.subcommand == "escalate"
|
||||
assert slash_command.is_grafana_command
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue