diff --git a/cmd/alertmanager/main.go b/cmd/alertmanager/main.go index 46365984..65726ac5 100644 --- a/cmd/alertmanager/main.go +++ b/cmd/alertmanager/main.go @@ -438,9 +438,8 @@ func run() int { if err != nil { return err } - receivers = append(receivers, notify.NewReceiver(rcv.Name, true, integrations)) // rcv.Name is guaranteed to be unique across all receivers. - //receivers[rcv.Name] = integrations + receivers = append(receivers, notify.NewReceiver(rcv.Name, true, integrations)) integrationsNum += len(integrations) } diff --git a/cmd/alertmanager/main_test.go b/cmd/alertmanager/main_test.go index ff3460a2..3b36b884 100644 --- a/cmd/alertmanager/main_test.go +++ b/cmd/alertmanager/main_test.go @@ -33,7 +33,7 @@ func TestBuildReceiverIntegrations(t *testing.T) { for _, tc := range []struct { receiver *config.Receiver err bool - exp []notify.Integration + exp []*notify.Integration }{ { receiver: &config.Receiver{ @@ -50,7 +50,7 @@ func TestBuildReceiverIntegrations(t *testing.T) { }, }, }, - exp: []notify.Integration{ + exp: []*notify.Integration{ notify.NewIntegration(nil, sendResolved(false), "webhook", 0), notify.NewIntegration(nil, sendResolved(true), "webhook", 1), },