From 7764739a8e458d16dd421d6e5238d7a09ca289f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=AA=20=C4=90=E1=BA=B7ng=20Ho=C3=A0i=20Nam?= Date: Wed, 10 Mar 2021 17:24:31 +0700 Subject: [PATCH] Alerting: Generate random id when testing notification channel (#31844) --- pkg/services/alerting/test_notification.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/services/alerting/test_notification.go b/pkg/services/alerting/test_notification.go index 33d449b6322..4b118652cb4 100644 --- a/pkg/services/alerting/test_notification.go +++ b/pkg/services/alerting/test_notification.go @@ -3,6 +3,7 @@ package alerting import ( "context" "fmt" + "math/rand" "net/http" "github.com/grafana/grafana/pkg/components/securejsondata" @@ -82,6 +83,7 @@ func createTestEvalContext(cmd *NotificationTestCommand) *EvalContext { Name: "Test notification", Message: "Someone is testing the alert notification within Grafana.", State: models.AlertStateAlerting, + ID: rand.Int63(), } ctx := NewEvalContext(context.Background(), testRule, fakeRequestValidator{})