Dashboards: use service for quotas (#98756)

This commit is contained in:
Stephanie Hingtgen
2025-01-09 22:21:21 -07:00
committed by GitHub
parent e195a56c24
commit 9488bf2915
29 changed files with 308 additions and 177 deletions
@@ -25,7 +25,6 @@ import (
"github.com/grafana/grafana/pkg/services/guardian"
"github.com/grafana/grafana/pkg/services/login"
"github.com/grafana/grafana/pkg/services/org"
"github.com/grafana/grafana/pkg/services/quota/quotatest"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/services/sqlstore/permissions"
"github.com/grafana/grafana/pkg/services/sqlstore/searchstore"
@@ -819,7 +818,7 @@ func setupNestedTest(t *testing.T, usr *user.SignedInUser, perms []accesscontrol
db, cfg := db.InitTestDBWithCfg(t)
// dashboard store commands that should be called.
dashStore, err := database.ProvideDashboardStore(db, cfg, features, tagimpl.ProvideService(db), quotatest.New(false, nil))
dashStore, err := database.ProvideDashboardStore(db, cfg, features, tagimpl.ProvideService(db))
require.NoError(t, err)
fStore := folderimpl.ProvideStore(db)
@@ -24,7 +24,6 @@ import (
"github.com/grafana/grafana/pkg/services/folder/folderimpl"
"github.com/grafana/grafana/pkg/services/guardian"
"github.com/grafana/grafana/pkg/services/org"
"github.com/grafana/grafana/pkg/services/quota/quotatest"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/services/sqlstore/permissions"
"github.com/grafana/grafana/pkg/services/supportbundles/supportbundlestest"
@@ -76,9 +75,7 @@ func setupBenchMark(b *testing.B, usr user.SignedInUser, features featuremgmt.Fe
store, cfg := db.InitTestDBWithCfg(b)
quotaService := quotatest.New(false, nil)
dashboardWriteStore, err := database.ProvideDashboardStore(store, cfg, features, tagimpl.ProvideService(store), quotaService)
dashboardWriteStore, err := database.ProvideDashboardStore(store, cfg, features, tagimpl.ProvideService(store))
require.NoError(b, err)
fStore := folderimpl.ProvideStore(store)