From 5986d99f51bb4b6fed381e18a706e6d6eb5dfad6 Mon Sep 17 00:00:00 2001 From: SLAMA <36870081+xy-man@users.noreply.github.com> Date: Wed, 11 Aug 2021 02:59:53 +0900 Subject: [PATCH] Alerting frontend : fix line notifier (#37744) - Fixes #37425 - change `line` type string to uppercase --- pkg/services/ngalert/notifier/alertmanager.go | 2 +- pkg/tests/api/alerting/api_notification_channel_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/services/ngalert/notifier/alertmanager.go b/pkg/services/ngalert/notifier/alertmanager.go index afd395c71cf..f68cb3a8b6a 100644 --- a/pkg/services/ngalert/notifier/alertmanager.go +++ b/pkg/services/ngalert/notifier/alertmanager.go @@ -475,7 +475,7 @@ func (am *Alertmanager) buildReceiverIntegrations(receiver *apimodels.PostableAp n, err = channels.NewDiscordNotifier(cfg, tmpl) case "googlechat": n, err = channels.NewGoogleChatNotifier(cfg, tmpl) - case "line": + case "LINE": n, err = channels.NewLineNotifier(cfg, tmpl) case "threema": n, err = channels.NewThreemaNotifier(cfg, tmpl) diff --git a/pkg/tests/api/alerting/api_notification_channel_test.go b/pkg/tests/api/alerting/api_notification_channel_test.go index c7d9e59dc35..ee0c898af1f 100644 --- a/pkg/tests/api/alerting/api_notification_channel_test.go +++ b/pkg/tests/api/alerting/api_notification_channel_test.go @@ -723,7 +723,7 @@ const alertmanagerConfig = ` "grafana_managed_receiver_configs": [ { "name": "line_test", - "type": "line", + "type": "LINE", "settings": {}, "secureSettings": { "token": "mysecrettoken" @@ -1217,7 +1217,7 @@ var expAlertmanagerConfigFromAPI = ` { "uid": "", "name": "line_test", - "type": "line", + "type": "LINE", "disableResolveMessage": false, "settings": {}, "secureFields": {