|
|
|
|
@ -28,10 +28,21 @@ func TestIntegrationUpdateFolder(t *testing.T) { |
|
|
|
|
if testing.Short() { |
|
|
|
|
t.Skip("skipping integration test") |
|
|
|
|
} |
|
|
|
|
testUpdateFolder(t, []string{}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func TestIntegrationUpdateFolderK8s(t *testing.T) { |
|
|
|
|
if testing.Short() { |
|
|
|
|
t.Skip("skipping integration test") |
|
|
|
|
} |
|
|
|
|
testUpdateFolder(t, []string{featuremgmt.FlagKubernetesClientDashboardsFolders}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func testUpdateFolder(t *testing.T, featureToggles []string) { |
|
|
|
|
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{ |
|
|
|
|
DisableAnonymous: true, |
|
|
|
|
EnableQuota: true, |
|
|
|
|
DisableAnonymous: true, |
|
|
|
|
EnableQuota: true, |
|
|
|
|
EnableFeatureToggles: featureToggles, |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
grafanaListedAddr, env := testinfra.StartGrafanaEnv(t, dir, path) |
|
|
|
|
@ -65,10 +76,21 @@ func TestIntegrationCreateFolder(t *testing.T) { |
|
|
|
|
if testing.Short() { |
|
|
|
|
t.Skip("skipping integration test") |
|
|
|
|
} |
|
|
|
|
testCreateFolder(t, []string{}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func TestIntegrationCreateFolderK8s(t *testing.T) { |
|
|
|
|
if testing.Short() { |
|
|
|
|
t.Skip("skipping integration test") |
|
|
|
|
} |
|
|
|
|
testCreateFolder(t, []string{featuremgmt.FlagKubernetesClientDashboardsFolders}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func testCreateFolder(t *testing.T, featureToggles []string) { |
|
|
|
|
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{ |
|
|
|
|
DisableAnonymous: true, |
|
|
|
|
EnableQuota: true, |
|
|
|
|
DisableAnonymous: true, |
|
|
|
|
EnableQuota: true, |
|
|
|
|
EnableFeatureToggles: featureToggles, |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
grafanaListedAddr, env := testinfra.StartGrafanaEnv(t, dir, path) |
|
|
|
|
@ -103,11 +125,21 @@ func TestIntegrationNestedFoldersOn(t *testing.T) { |
|
|
|
|
if testing.Short() { |
|
|
|
|
t.Skip("skipping integration test") |
|
|
|
|
} |
|
|
|
|
testNestedFoldersOn(t, []string{}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func TestIntegrationNestedFoldersOnK8s(t *testing.T) { |
|
|
|
|
if testing.Short() { |
|
|
|
|
t.Skip("skipping integration test") |
|
|
|
|
} |
|
|
|
|
testNestedFoldersOn(t, []string{featuremgmt.FlagKubernetesClientDashboardsFolders}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func testNestedFoldersOn(t *testing.T, featureToggles []string) { |
|
|
|
|
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{ |
|
|
|
|
DisableAnonymous: true, |
|
|
|
|
EnableQuota: true, |
|
|
|
|
EnableFeatureToggles: []string{featuremgmt.FlagNestedFolders}, |
|
|
|
|
EnableFeatureToggles: featureToggles, |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
grafanaListedAddr, env := testinfra.StartGrafanaEnv(t, dir, path) |
|
|
|
|
|