extracts alertmanager from DI, including migrations (#34071)

* extracts alertmanager from DI, including migrations

* includes alertmanager Run method in ngalert

* removes 3s test shutdown timeout

* lint
This commit is contained in:
Owen Diehl
2021-05-13 14:01:38 -04:00
committed by GitHub
parent ec3214bac2
commit baca873a84
9 changed files with 77 additions and 79 deletions

View File

@@ -10,7 +10,6 @@ import (
"path/filepath"
"strings"
"testing"
"time"
"github.com/grafana/grafana/pkg/infra/fs"
"github.com/grafana/grafana/pkg/models"
@@ -66,8 +65,6 @@ func StartGrafana(t *testing.T, grafDir, cfgPath string, sqlStore *sqlstore.SQLS
}
}()
t.Cleanup(func() {
ctx, cancel := context.WithTimeout(ctx, 3*time.Second)
defer cancel()
if err := server.Shutdown(ctx, "test cleanup"); err != nil {
t.Error("Timed out waiting on server to shut down")
}