alerting: fix a bunch of lint issues. (#17128)

This commit is contained in:
Carl Bergquist
2019-05-20 12:13:32 +02:00
committed by GitHub
parent a564a54b13
commit bd5bcea5d0
18 changed files with 122 additions and 111 deletions
+5 -3
View File
@@ -6,9 +6,10 @@ import (
"math"
"testing"
"time"
"github.com/grafana/grafana/pkg/setting"
. "github.com/smartystreets/goconvey/convey"
"time"
)
type FakeEvalHandler struct {
@@ -32,13 +33,14 @@ func (handler *FakeEvalHandler) Eval(evalContext *EvalContext) {
type FakeResultHandler struct{}
func (handler *FakeResultHandler) Handle(evalContext *EvalContext) error {
func (handler *FakeResultHandler) handle(evalContext *EvalContext) error {
return nil
}
func TestEngineProcessJob(t *testing.T) {
Convey("Alerting engine job processing", t, func() {
engine := NewEngine()
engine := &AlertingService{}
engine.Init()
setting.AlertingEvaluationTimeout = 30 * time.Second
setting.AlertingNotificationTimeout = 30 * time.Second
setting.AlertingMaxAttempts = 3