Chore: remove busmock (#57170)

This commit is contained in:
ying-jeanne
2022-10-18 21:31:56 +08:00
committed by GitHub
parent 4b1b0344e4
commit ed98d7bc27
6 changed files with 18 additions and 25 deletions
@@ -9,8 +9,9 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
busmock "github.com/grafana/grafana/pkg/bus/mock"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/infra/tracing"
"github.com/grafana/grafana/pkg/models"
acmock "github.com/grafana/grafana/pkg/services/accesscontrol/mock"
"github.com/grafana/grafana/pkg/services/dashboards"
@@ -32,8 +33,7 @@ func TestIntegrationProvideFolderService(t *testing.T) {
t.Run("should register scope resolvers", func(t *testing.T) {
cfg := setting.NewCfg()
ac := acmock.New()
ProvideService(ac, busmock.New(), cfg, nil, nil, nil, nil, nil)
ProvideService(ac, bus.ProvideBus(tracing.InitializeTracerForTest()), cfg, nil, nil, nil, nil, nil)
require.Len(t, ac.Calls.RegisterAttributeScopeResolver, 2)
})
@@ -61,7 +61,7 @@ func TestIntegrationFolderService(t *testing.T) {
searchService: nil,
features: features,
permissions: folderPermissions,
bus: busmock.New(),
bus: bus.ProvideBus(tracing.InitializeTracerForTest()),
}
t.Run("Given user has no permissions", func(t *testing.T) {