K8s: Enable integration tests on folders and dashboards (#103075)

K8s: Enable e2e tests on folders and dashboards
This commit is contained in:
Stephanie Hingtgen
2025-03-31 04:02:19 -06:00
committed by GitHub
parent 54a51bd3e3
commit dd628903f4
3 changed files with 61 additions and 7 deletions
+9 -1
View File
@@ -26,13 +26,21 @@ func TestMain(m *testing.M) {
}
func TestGetFolders(t *testing.T) {
testGetFolders(t, []string{featuremgmt.FlagNestedFolders})
}
func TestGetFoldersK8s(t *testing.T) {
testGetFolders(t, []string{featuremgmt.FlagNestedFolders, featuremgmt.FlagKubernetesClientDashboardsFolders})
}
func testGetFolders(t *testing.T, featureToggles []string) {
// Setup Grafana and its Database
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
DisableAnonymous: true,
AppModeProduction: true,
EnableFeatureToggles: []string{featuremgmt.FlagNestedFolders},
EnableFeatureToggles: featureToggles,
})
grafanaListedAddr, env := testinfra.StartGrafanaEnv(t, dir, p)