From cebd9cf2d899acb01128c7c01997ae8161a78c78 Mon Sep 17 00:00:00 2001 From: Henry Megarry Date: Thu, 13 Apr 2017 18:37:16 +0000 Subject: [PATCH] fixing sensu test bug --- server/server_test.go | 1 - services/alert/service.go | 2 +- services/sensu/service.go | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/server/server_test.go b/server/server_test.go index 2b1120d601..aff6fa5356 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -7756,7 +7756,6 @@ stream .message('message') .details('details') .crit(lambda: TRUE) - .sensu() ` if _, err := cli.CreateTask(client.CreateTaskOptions{ diff --git a/services/alert/service.go b/services/alert/service.go index d16462af32..016c286339 100644 --- a/services/alert/service.go +++ b/services/alert/service.go @@ -775,7 +775,7 @@ func (s *Service) createHandlerFromSpec(spec HandlerSpec) (handler, error) { if err != nil { return handler{}, err } - h, err := s.SensuService.Handler(c, s.logger) + h, err = s.SensuService.Handler(c, s.logger) if err != nil { return handler{}, err } diff --git a/services/sensu/service.go b/services/sensu/service.go index 3700f3a9b1..f891ada038 100644 --- a/services/sensu/service.go +++ b/services/sensu/service.go @@ -189,7 +189,6 @@ func (h *handler) Handle(event alert.Event) { return } sourceStr := buf.String() - buf.Reset() if err := h.s.Alert( event.State.ID,