diff --git a/cmd/alertmanager/main_test.go b/cmd/alertmanager/main_test.go index af45316b36..8939853608 100644 --- a/cmd/alertmanager/main_test.go +++ b/cmd/alertmanager/main_test.go @@ -21,10 +21,6 @@ import ( "github.com/stretchr/testify/require" ) -type sendResolved bool - -func (s sendResolved) SendResolved() bool { return bool(s) } - func TestExternalURL(t *testing.T) { hostname := "foo" for _, tc := range []struct { diff --git a/notify/receiver/receiver.go b/notify/receiver/receiver.go index 70eb5352a2..cf7e23b5a0 100644 --- a/notify/receiver/receiver.go +++ b/notify/receiver/receiver.go @@ -16,6 +16,8 @@ package receiver import ( "github.com/go-kit/log" + commoncfg "github.com/prometheus/common/config" + "github.com/prometheus/alertmanager/config" "github.com/prometheus/alertmanager/notify" "github.com/prometheus/alertmanager/notify/discord" @@ -33,12 +35,11 @@ import ( "github.com/prometheus/alertmanager/notify/wechat" "github.com/prometheus/alertmanager/template" "github.com/prometheus/alertmanager/types" - commoncfg "github.com/prometheus/common/config" ) type Wrapper func(string, notify.Notifier) notify.Notifier -var NoWrap Wrapper = nil +var NoWrap Wrapper // BuildReceiverIntegrations builds a list of integration notifiers off of a // receiver config. diff --git a/notify/receiver/receiver_test.go b/notify/receiver/receiver_test.go index b47322fff5..c282de5897 100644 --- a/notify/receiver/receiver_test.go +++ b/notify/receiver/receiver_test.go @@ -89,7 +89,7 @@ func TestBuildReceiverIntegrations(t *testing.T) { t.Run("invokes notifier wrapper func", func(t *testing.T) { calls := 0 wrap := func(_ string, n notify.Notifier) notify.Notifier { - calls += 1 + calls++ return n } cfg := config.Receiver{