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
@@ -17,7 +17,8 @@ import (
func TestEngineTimeouts(t *testing.T) {
Convey("Alerting engine timeout tests", t, func() {
engine := NewEngine()
engine := &AlertingService{}
engine.Init()
setting.AlertingNotificationTimeout = 30 * time.Second
setting.AlertingMaxAttempts = 3
engine.resultHandler = &FakeResultHandler{}
@@ -89,7 +90,7 @@ func (handler *FakeCommonTimeoutHandler) Eval(evalContext *EvalContext) {
evalContext.Error = errors.New("Fake evaluation timeout test failure; wrong response")
}
func (handler *FakeCommonTimeoutHandler) Handle(evalContext *EvalContext) error {
func (handler *FakeCommonTimeoutHandler) handle(evalContext *EvalContext) error {
// 1. prepare mock server
path := "/resulthandle"
srv := runBusyServer(path, handler.ServerBusySleepDuration)