Chore: Make Cfg field private in SQLStore (#85593)
* make cfg private in sqlstore * fix db init in tests * fix case * fix folder test init * fix imports * make another Cfg private * remove another Cfg * remove unused variable * use store cfg, it has side-effects * fix mutated cfg in tests
This commit is contained in:
@@ -47,8 +47,7 @@ func TestIntegrationDashboardFolderDataAccess(t *testing.T) {
|
||||
var dashboardStore dashboards.Store
|
||||
|
||||
setup := func() {
|
||||
sql := db.InitTestDB(t)
|
||||
sqlStore, cfg = sql, sql.Cfg
|
||||
sqlStore, cfg = db.InitTestDBWithCfg(t)
|
||||
quotaService := quotatest.New(false, nil)
|
||||
var err error
|
||||
dashboardStore, err = ProvideDashboardStore(sqlStore, cfg, testFeatureToggles, tagimpl.ProvideService(sqlStore), quotaService)
|
||||
@@ -147,8 +146,7 @@ func TestIntegrationDashboardFolderDataAccess(t *testing.T) {
|
||||
var currentUser *user.SignedInUser
|
||||
|
||||
setup2 := func() {
|
||||
sql := db.InitTestDB(t)
|
||||
sqlStore, cfg = sql, sql.Cfg
|
||||
sqlStore, cfg = db.InitTestDBWithCfg(t)
|
||||
quotaService := quotatest.New(false, nil)
|
||||
var err error
|
||||
dashboardStore, err = ProvideDashboardStore(sqlStore, cfg, testFeatureToggles, tagimpl.ProvideService(sqlStore), quotaService)
|
||||
@@ -253,8 +251,7 @@ func TestIntegrationDashboardInheritedFolderRBAC(t *testing.T) {
|
||||
var viewer *user.SignedInUser
|
||||
|
||||
setup := func() {
|
||||
sql := db.InitTestDB(t)
|
||||
sqlStore, cfg = sql, sql.Cfg
|
||||
sqlStore, cfg = db.InitTestDBWithCfg(t)
|
||||
quotaService := quotatest.New(false, nil)
|
||||
|
||||
// enable nested folders so that the folder table is populated for all the tests
|
||||
|
||||
Reference in New Issue
Block a user