Chore: Switch over to team.Service instead of sqlstore (#55497)

* switch to using team service

* trying to fix tests

* more tests to fix

* add missing teamtest package
This commit is contained in:
Serge Zaitsev
2022-09-20 18:58:04 +02:00
committed by GitHub
parent 40bc140a9a
commit 305d494902
25 changed files with 192 additions and 94 deletions

View File

@@ -24,6 +24,7 @@ import (
"github.com/grafana/grafana/pkg/services/org"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/services/sqlstore/mockstore"
"github.com/grafana/grafana/pkg/services/team/teamtest"
"github.com/grafana/grafana/pkg/services/user"
"github.com/grafana/grafana/pkg/setting"
)
@@ -1441,7 +1442,7 @@ func updateFolderACL(t *testing.T, dashboardStore *database.DashboardStore, fold
func scenarioWithLibraryPanel(t *testing.T, desc string, fn func(t *testing.T, sc scenarioContext)) {
store := mockstore.NewSQLStoreMock()
guardian.InitLegacyGuardian(store, &dashboards.FakeDashboardService{})
guardian.InitLegacyGuardian(store, &dashboards.FakeDashboardService{}, &teamtest.FakeService{})
t.Helper()
testScenario(t, desc, func(t *testing.T, sc scenarioContext) {