Chore: Remove bus.Bus field (#47695) (#47704)

* Chore: Remove bus.Bus field

* fix integration test

(cherry picked from commit e86b6662a1)

Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2022-04-13 19:11:20 +02:00
committed by GitHub
co-authored by Serge Zaitsev
parent 5332a2db05
commit f01f1073b8
38 changed files with 70 additions and 204 deletions
+1 -3
View File
@@ -7,7 +7,6 @@ import (
"testing"
"time"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/infra/tracing"
"github.com/grafana/grafana/pkg/infra/usagestats"
@@ -100,13 +99,12 @@ func (a *AlertStoreMock) SetAlertState(_ context.Context, _ *models.SetAlertStat
}
func TestEngineProcessJob(t *testing.T) {
bus := bus.New()
usMock := &usagestats.UsageStatsMock{T: t}
tracer, err := tracing.InitializeTracerForTest()
require.NoError(t, err)
store := &AlertStoreMock{}
engine := ProvideAlertEngine(nil, bus, nil, nil, usMock, ossencryption.ProvideService(), nil, tracer, store, setting.NewCfg(), nil)
engine := ProvideAlertEngine(nil, nil, nil, usMock, ossencryption.ProvideService(), nil, tracer, store, setting.NewCfg(), nil)
setting.AlertingEvaluationTimeout = 30 * time.Second
setting.AlertingNotificationTimeout = 30 * time.Second
setting.AlertingMaxAttempts = 3