chore: add replDB to team service (#91799)
This commit is contained in:
@@ -25,7 +25,6 @@ import (
|
||||
|
||||
"github.com/grafana/grafana/pkg/apimachinery/identity"
|
||||
"github.com/grafana/grafana/pkg/apimachinery/utils"
|
||||
"github.com/grafana/grafana/pkg/infra/db"
|
||||
"github.com/grafana/grafana/pkg/infra/localcache"
|
||||
"github.com/grafana/grafana/pkg/infra/tracing"
|
||||
"github.com/grafana/grafana/pkg/server"
|
||||
@@ -436,12 +435,13 @@ func (c *K8sTestHelper) CreateUser(name string, orgName string, basicRole org.Ro
|
||||
c.t.Helper()
|
||||
|
||||
store := c.env.SQLStore
|
||||
replStore := c.env.ReadReplStore
|
||||
defer func() {
|
||||
c.env.Cfg.AutoAssignOrg = false
|
||||
c.env.Cfg.AutoAssignOrgId = 1 // the default
|
||||
}()
|
||||
|
||||
quotaService := quotaimpl.ProvideService(db.FakeReplDBFromDB(store), c.env.Cfg)
|
||||
quotaService := quotaimpl.ProvideService(replStore, c.env.Cfg)
|
||||
|
||||
orgService, err := orgimpl.ProvideService(store, c.env.Cfg, quotaService)
|
||||
require.NoError(c.t, err)
|
||||
@@ -462,7 +462,7 @@ func (c *K8sTestHelper) CreateUser(name string, orgName string, basicRole org.Ro
|
||||
c.env.Cfg.AutoAssignOrg = true
|
||||
c.env.Cfg.AutoAssignOrgId = int(orgId)
|
||||
|
||||
teamSvc, err := teamimpl.ProvideService(store, c.env.Cfg, tracing.InitializeTracerForTest())
|
||||
teamSvc, err := teamimpl.ProvideService(replStore, c.env.Cfg, tracing.InitializeTracerForTest())
|
||||
require.NoError(c.t, err)
|
||||
|
||||
cache := localcache.ProvideService()
|
||||
|
||||
Reference in New Issue
Block a user