K8s: Dashboards: Fix multi-org quota (#103073)

This commit is contained in:
Stephanie Hingtgen
2025-03-31 14:34:39 +01:00
committed by GitHub
parent 39c33d421b
commit 19a52ba35e
3 changed files with 22 additions and 9 deletions
@@ -47,14 +47,25 @@ func TestIntegrationDashboardQuota(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testDashboardQuota(t, []string{})
}
func TestIntegrationDashboardQuotaK8s(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testDashboardQuota(t, []string{featuremgmt.FlagKubernetesClientDashboardsFolders})
}
func testDashboardQuota(t *testing.T, featureToggles []string) {
// enable quota and set low dashboard quota
// Setup Grafana and its Database
dashboardQuota := int64(1)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableAnonymous: true,
EnableQuota: true,
DashboardOrgQuota: &dashboardQuota,
DisableAnonymous: true,
EnableQuota: true,
DashboardOrgQuota: &dashboardQuota,
EnableFeatureToggles: featureToggles,
})
grafanaListedAddr, env := testinfra.StartGrafanaEnv(t, dir, path)