DashboardStore: Use ReplDB and get dashboard quotas from the ReadReplica (#90235)

* Use ReplDB in dashboard store and update all fixtures - no other changes

* just moving dashboard counts for now

* find the missing test fixture
This commit is contained in:
Kristin Laemmert
2024-07-12 10:47:49 -04:00
committed by GitHub
parent e64ef2245c
commit 8a6107cd35
35 changed files with 256 additions and 244 deletions
@@ -23,15 +23,15 @@ func TestMain(m *testing.M) {
}
func TestIntegrationDashboardFolderStore(t *testing.T) {
var sqlStore db.DB
var sqlStore db.ReplDB
var cfg *setting.Cfg
var dashboardStore dashboards.Store
setup := func() {
sqlStore, cfg = db.InitTestDBWithCfg(t)
sqlStore, cfg = db.InitTestReplDBWithCfg(t)
quotaService := quotatest.New(false, nil)
var err error
dashboardStore, err = database.ProvideDashboardStore(sqlStore, cfg, featuremgmt.WithFeatures(featuremgmt.FlagPanelTitleSearch), tagimpl.ProvideService(sqlStore), quotaService)
dashboardStore, err = database.ProvideDashboardStore(sqlStore, cfg, featuremgmt.WithFeatures(featuremgmt.FlagPanelTitleSearch), tagimpl.ProvideService(sqlStore.DB()), quotaService)
require.NoError(t, err)
}
t.Run("Given dashboard and folder with the same title", func(t *testing.T) {