Use separate fake for rule reader (#55835)

This commit is contained in:
Alexander Weaver
2022-09-27 10:33:32 -05:00
committed by GitHub
parent 3361f2c62d
commit 81b631d1e9
2 changed files with 7 additions and 2 deletions

View File

@@ -17,7 +17,6 @@ import (
"github.com/grafana/grafana/pkg/services/ngalert/eval"
"github.com/grafana/grafana/pkg/services/ngalert/metrics"
ngmodels "github.com/grafana/grafana/pkg/services/ngalert/models"
"github.com/grafana/grafana/pkg/services/ngalert/store"
)
// Not for parallel tests.
@@ -95,7 +94,7 @@ func Test_maybeNewImage(t *testing.T) {
t.Run(test.description, func(t *testing.T) {
imageService := &CountingImageService{}
mgr := NewManager(log.NewNopLogger(), &metrics.State{}, nil,
&store.FakeRuleStore{}, &FakeInstanceStore{},
&FakeRuleReader{}, &FakeInstanceStore{},
&dashboards.FakeDashboardService{}, imageService, clock.NewMock(), annotationstest.NewFakeAnnotationsRepo())
err := mgr.maybeTakeScreenshot(context.Background(), &ngmodels.AlertRule{}, test.state, test.oldState)
require.NoError(t, err)