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
+3 -2
View File
@@ -773,7 +773,8 @@ func TestIntegrationSoftDeletion(t *testing.T) {
// Set up search v2.
folderCount := 1
dashboardsPerFolder := 1
sqlStore, cfg := db.InitTestDBWithCfg(t)
replStore, cfg := db.InitTestReplDBWithCfg(t)
sqlStore := replStore.DB()
searchService, testUser, err := setupIntegrationEnv(t, folderCount, dashboardsPerFolder, sqlStore)
require.NoError(t, err)
@@ -791,7 +792,7 @@ func TestIntegrationSoftDeletion(t *testing.T) {
// Set up dashboard store.
quotaService := quotatest.New(false, nil)
featureToggles := featuremgmt.WithFeatures(featuremgmt.FlagPanelTitleSearch, featuremgmt.FlagDashboardRestore)
dashboardStore, err := database.ProvideDashboardStore(sqlStore, cfg, featureToggles, tagimpl.ProvideService(sqlStore), quotaService)
dashboardStore, err := database.ProvideDashboardStore(replStore, cfg, featureToggles, tagimpl.ProvideService(sqlStore), quotaService)
require.NoError(t, err)
// Soft delete "dashboard2".