Folders: Move to integration tests (#108733)

This commit is contained in:
Stephanie Hingtgen
2025-07-29 09:57:44 +00:00
committed by GitHub
parent af72ef31d1
commit 39b9700048
5 changed files with 465 additions and 2367 deletions
+4 -9
View File
@@ -26,21 +26,16 @@ 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) {
if testing.Short() {
t.Skip("skipping integration test")
}
// Setup Grafana and its Database
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
DisableAnonymous: true,
AppModeProduction: true,
EnableFeatureToggles: featureToggles,
EnableFeatureToggles: []string{featuremgmt.FlagKubernetesClientDashboardsFolders},
})
grafanaListedAddr, env := testinfra.StartGrafanaEnv(t, dir, p)