K8s/Folders: Fix tests for creating folders (#94192)

* Add feature toggle grafanaAPIServerTestingWithExperimentalAPIs
* Customise registration of FolderAPIBuilder for tests and fix tests
pull/94194/head^2
Arati R. 10 months ago committed by GitHub
parent 1635a3cd67
commit a42caa7a61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 175
      docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md
  2. 1
      packages/grafana-data/src/types/featureToggles.gen.ts
  3. 4
      pkg/registry/apis/folders/register.go
  4. 6
      pkg/services/featuremgmt/registry.go
  5. 1
      pkg/services/featuremgmt/toggles_gen.csv
  6. 4
      pkg/services/featuremgmt/toggles_gen.go
  7. 12
      pkg/services/featuremgmt/toggles_gen.json
  8. 40
      pkg/tests/apis/folder/folders_test.go

@ -118,93 +118,94 @@ Most [generally available](https://grafana.com/docs/release-life-cycle/#general-
[Experimental](https://grafana.com/docs/release-life-cycle/#experimental) features are early in their development lifecycle and so are not yet supported in Grafana Cloud. [Experimental](https://grafana.com/docs/release-life-cycle/#experimental) features are early in their development lifecycle and so are not yet supported in Grafana Cloud.
Experimental features might be changed or removed without prior notice. Experimental features might be changed or removed without prior notice.
| Feature toggle name | Description | | Feature toggle name | Description |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `live-service-web-worker` | This will use a webworker thread to processes events rather than the main thread | | `live-service-web-worker` | This will use a webworker thread to processes events rather than the main thread |
| `queryOverLive` | Use Grafana Live WebSocket to execute backend queries | | `queryOverLive` | Use Grafana Live WebSocket to execute backend queries |
| `lokiExperimentalStreaming` | Support new streaming approach for loki (prototype, needs special loki build) | | `lokiExperimentalStreaming` | Support new streaming approach for loki (prototype, needs special loki build) |
| `storage` | Configurable storage for dashboards, datasources, and resources | | `storage` | Configurable storage for dashboards, datasources, and resources |
| `canvasPanelNesting` | Allow elements nesting | | `canvasPanelNesting` | Allow elements nesting |
| `vizActions` | Allow actions in visualizations | | `vizActions` | Allow actions in visualizations |
| `disableSecretsCompatibility` | Disable duplicated secret storage in legacy tables | | `disableSecretsCompatibility` | Disable duplicated secret storage in legacy tables |
| `logRequestsInstrumentedAsUnknown` | Logs the path for requests that are instrumented as unknown | | `logRequestsInstrumentedAsUnknown` | Logs the path for requests that are instrumented as unknown |
| `showDashboardValidationWarnings` | Show warnings when dashboards do not validate against the schema | | `showDashboardValidationWarnings` | Show warnings when dashboards do not validate against the schema |
| `mysqlAnsiQuotes` | Use double quotes to escape keyword in a MySQL query | | `mysqlAnsiQuotes` | Use double quotes to escape keyword in a MySQL query |
| `mysqlParseTime` | Ensure the parseTime flag is set for MySQL driver | | `mysqlParseTime` | Ensure the parseTime flag is set for MySQL driver |
| `alertingBacktesting` | Rule backtesting API for alerting | | `alertingBacktesting` | Rule backtesting API for alerting |
| `editPanelCSVDragAndDrop` | Enables drag and drop for CSV and Excel files | | `editPanelCSVDragAndDrop` | Enables drag and drop for CSV and Excel files |
| `lokiQuerySplittingConfig` | Give users the option to configure split durations for Loki queries | | `lokiQuerySplittingConfig` | Give users the option to configure split durations for Loki queries |
| `individualCookiePreferences` | Support overriding cookie preferences per user | | `individualCookiePreferences` | Support overriding cookie preferences per user |
| `influxqlStreamingParser` | Enable streaming JSON parser for InfluxDB datasource InfluxQL query language | | `influxqlStreamingParser` | Enable streaming JSON parser for InfluxDB datasource InfluxQL query language |
| `lokiLogsDataplane` | Changes logs responses from Loki to be compliant with the dataplane specification. | | `lokiLogsDataplane` | Changes logs responses from Loki to be compliant with the dataplane specification. |
| `disableSSEDataplane` | Disables dataplane specific processing in server side expressions. | | `disableSSEDataplane` | Disables dataplane specific processing in server side expressions. |
| `alertStateHistoryLokiSecondary` | Enable Grafana to write alert state history to an external Loki instance in addition to Grafana annotations. | | `alertStateHistoryLokiSecondary` | Enable Grafana to write alert state history to an external Loki instance in addition to Grafana annotations. |
| `alertStateHistoryLokiPrimary` | Enable a remote Loki instance as the primary source for state history reads. | | `alertStateHistoryLokiPrimary` | Enable a remote Loki instance as the primary source for state history reads. |
| `alertStateHistoryLokiOnly` | Disable Grafana alerts from emitting annotations when a remote Loki instance is available. | | `alertStateHistoryLokiOnly` | Disable Grafana alerts from emitting annotations when a remote Loki instance is available. |
| `unifiedRequestLog` | Writes error logs to the request logger | | `unifiedRequestLog` | Writes error logs to the request logger |
| `extraThemes` | Enables extra themes | | `extraThemes` | Enables extra themes |
| `lokiPredefinedOperations` | Adds predefined query operations to Loki query editor | | `lokiPredefinedOperations` | Adds predefined query operations to Loki query editor |
| `pluginsFrontendSandbox` | Enables the plugins frontend sandbox | | `pluginsFrontendSandbox` | Enables the plugins frontend sandbox |
| `frontendSandboxMonitorOnly` | Enables monitor only in the plugin frontend sandbox (if enabled) | | `frontendSandboxMonitorOnly` | Enables monitor only in the plugin frontend sandbox (if enabled) |
| `pluginsDetailsRightPanel` | Enables right panel for the plugins details page | | `pluginsDetailsRightPanel` | Enables right panel for the plugins details page |
| `vizAndWidgetSplit` | Split panels between visualizations and widgets | | `vizAndWidgetSplit` | Split panels between visualizations and widgets |
| `awsDatasourcesTempCredentials` | Support temporary security credentials in AWS plugins for Grafana Cloud customers | | `awsDatasourcesTempCredentials` | Support temporary security credentials in AWS plugins for Grafana Cloud customers |
| `mlExpressions` | Enable support for Machine Learning in server-side expressions | | `mlExpressions` | Enable support for Machine Learning in server-side expressions |
| `metricsSummary` | Enables metrics summary queries in the Tempo data source | | `metricsSummary` | Enables metrics summary queries in the Tempo data source |
| `datasourceAPIServers` | Expose some datasources as apiservers. | | `datasourceAPIServers` | Expose some datasources as apiservers. |
| `permissionsFilterRemoveSubquery` | Alternative permission filter implementation that does not use subqueries for fetching the dashboard folder | | `permissionsFilterRemoveSubquery` | Alternative permission filter implementation that does not use subqueries for fetching the dashboard folder |
| `aiGeneratedDashboardChanges` | Enable AI powered features for dashboards to auto-summary changes when saving | | `aiGeneratedDashboardChanges` | Enable AI powered features for dashboards to auto-summary changes when saving |
| `sseGroupByDatasource` | Send query to the same datasource in a single request when using server side expressions. The `cloudWatchBatchQueries` feature toggle should be enabled if this used with CloudWatch. | | `sseGroupByDatasource` | Send query to the same datasource in a single request when using server side expressions. The `cloudWatchBatchQueries` feature toggle should be enabled if this used with CloudWatch. |
| `libraryPanelRBAC` | Enables RBAC support for library panels | | `libraryPanelRBAC` | Enables RBAC support for library panels |
| `wargamesTesting` | Placeholder feature flag for internal testing | | `wargamesTesting` | Placeholder feature flag for internal testing |
| `externalCorePlugins` | Allow core plugins to be loaded as external | | `externalCorePlugins` | Allow core plugins to be loaded as external |
| `pluginsAPIMetrics` | Sends metrics of public grafana packages usage by plugins | | `pluginsAPIMetrics` | Sends metrics of public grafana packages usage by plugins |
| `enableNativeHTTPHistogram` | Enables native HTTP Histograms | | `enableNativeHTTPHistogram` | Enables native HTTP Histograms |
| `disableClassicHTTPHistogram` | Disables classic HTTP Histogram (use with enableNativeHTTPHistogram) | | `disableClassicHTTPHistogram` | Disables classic HTTP Histogram (use with enableNativeHTTPHistogram) |
| `kubernetesSnapshots` | Routes snapshot requests from /api to the /apis endpoint | | `kubernetesSnapshots` | Routes snapshot requests from /api to the /apis endpoint |
| `kubernetesDashboards` | Use the kubernetes API in the frontend for dashboards | | `kubernetesDashboards` | Use the kubernetes API in the frontend for dashboards |
| `kubernetesFolders` | Use the kubernetes API in the frontend for folders, and route /api/folders requests to k8s | | `kubernetesFolders` | Use the kubernetes API in the frontend for folders, and route /api/folders requests to k8s |
| `datasourceQueryTypes` | Show query type endpoints in datasource API servers (currently hardcoded for testdata, expressions, and prometheus) | | `grafanaAPIServerTestingWithExperimentalAPIs` | Facilitate integration testing of experimental APIs |
| `queryService` | Register /apis/query.grafana.app/ -- will eventually replace /api/ds/query | | `datasourceQueryTypes` | Show query type endpoints in datasource API servers (currently hardcoded for testdata, expressions, and prometheus) |
| `queryServiceRewrite` | Rewrite requests targeting /ds/query to the query service | | `queryService` | Register /apis/query.grafana.app/ -- will eventually replace /api/ds/query |
| `queryServiceFromUI` | Routes requests to the new query service | | `queryServiceRewrite` | Rewrite requests targeting /ds/query to the query service |
| `cachingOptimizeSerializationMemoryUsage` | If enabled, the caching backend gradually serializes query responses for the cache, comparing against the configured `[caching]max_value_mb` value as it goes. This can can help prevent Grafana from running out of memory while attempting to cache very large query responses. | | `queryServiceFromUI` | Routes requests to the new query service |
| `prometheusPromQAIL` | Prometheus and AI/ML to assist users in creating a query | | `cachingOptimizeSerializationMemoryUsage` | If enabled, the caching backend gradually serializes query responses for the cache, comparing against the configured `[caching]max_value_mb` value as it goes. This can can help prevent Grafana from running out of memory while attempting to cache very large query responses. |
| `prometheusCodeModeMetricNamesSearch` | Enables search for metric names in Code Mode, to improve performance when working with an enormous number of metric names | | `prometheusPromQAIL` | Prometheus and AI/ML to assist users in creating a query |
| `alertmanagerRemoteSecondary` | Enable Grafana to sync configuration and state with a remote Alertmanager. | | `prometheusCodeModeMetricNamesSearch` | Enables search for metric names in Code Mode, to improve performance when working with an enormous number of metric names |
| `alertmanagerRemotePrimary` | Enable Grafana to have a remote Alertmanager instance as the primary Alertmanager. | | `alertmanagerRemoteSecondary` | Enable Grafana to sync configuration and state with a remote Alertmanager. |
| `alertmanagerRemoteOnly` | Disable the internal Alertmanager and only use the external one defined. | | `alertmanagerRemotePrimary` | Enable Grafana to have a remote Alertmanager instance as the primary Alertmanager. |
| `extractFieldsNameDeduplication` | Make sure extracted field names are unique in the dataframe | | `alertmanagerRemoteOnly` | Disable the internal Alertmanager and only use the external one defined. |
| `pluginsSkipHostEnvVars` | Disables passing host environment variable to plugin processes | | `extractFieldsNameDeduplication` | Make sure extracted field names are unique in the dataframe |
| `tableSharedCrosshair` | Enables shared crosshair in table panel | | `pluginsSkipHostEnvVars` | Disables passing host environment variable to plugin processes |
| `kubernetesFeatureToggles` | Use the kubernetes API for feature toggle management in the frontend | | `tableSharedCrosshair` | Enables shared crosshair in table panel |
| `newFolderPicker` | Enables the nested folder picker without having nested folders enabled | | `kubernetesFeatureToggles` | Use the kubernetes API for feature toggle management in the frontend |
| `sqlExpressions` | Enables using SQL and DuckDB functions as Expressions. | | `newFolderPicker` | Enables the nested folder picker without having nested folders enabled |
| `nodeGraphDotLayout` | Changed the layout algorithm for the node graph | | `sqlExpressions` | Enables using SQL and DuckDB functions as Expressions. |
| `kubernetesAggregator` | Enable grafana's embedded kube-aggregator | | `nodeGraphDotLayout` | Changed the layout algorithm for the node graph |
| `expressionParser` | Enable new expression parser | | `kubernetesAggregator` | Enable grafana's embedded kube-aggregator |
| `disableNumericMetricsSortingInExpressions` | In server-side expressions, disable the sorting of numeric-kind metrics by their metric name or labels. | | `expressionParser` | Enable new expression parser |
| `queryLibrary` | Enables Query Library feature in Explore | | `disableNumericMetricsSortingInExpressions` | In server-side expressions, disable the sorting of numeric-kind metrics by their metric name or labels. |
| `logsExploreTableDefaultVisualization` | Sets the logs table as default visualisation in logs explore | | `queryLibrary` | Enables Query Library feature in Explore |
| `alertingListViewV2` | Enables the new alert list view design | | `logsExploreTableDefaultVisualization` | Sets the logs table as default visualisation in logs explore |
| `dashboardRestore` | Enables deleted dashboard restore feature (backend only) | | `alertingListViewV2` | Enables the new alert list view design |
| `alertingCentralAlertHistory` | Enables the new central alert history. | | `dashboardRestore` | Enables deleted dashboard restore feature (backend only) |
| `pinNavItems` | Enables pinning of nav items | | `alertingCentralAlertHistory` | Enables the new central alert history. |
| `failWrongDSUID` | Throws an error if a datasource has an invalid UIDs | | `pinNavItems` | Enables pinning of nav items |
| `alertingApiServer` | Register Alerting APIs with the K8s API server | | `failWrongDSUID` | Throws an error if a datasource has an invalid UIDs |
| `dashboardRestoreUI` | Enables the frontend to be able to restore a recently deleted dashboard | | `alertingApiServer` | Register Alerting APIs with the K8s API server |
| `dataplaneAggregator` | Enable grafana dataplane aggregator | | `dashboardRestoreUI` | Enables the frontend to be able to restore a recently deleted dashboard |
| `newFiltersUI` | Enables new combobox style UI for the Ad hoc filters variable in scenes architecture | | `dataplaneAggregator` | Enable grafana dataplane aggregator |
| `lokiSendDashboardPanelNames` | Send dashboard and panel names to Loki when querying | | `newFiltersUI` | Enables new combobox style UI for the Ad hoc filters variable in scenes architecture |
| `alertingPrometheusRulesPrimary` | Uses Prometheus rules as the primary source of truth for ruler-enabled data sources | | `lokiSendDashboardPanelNames` | Send dashboard and panel names to Loki when querying |
| `singleTopNav` | Unifies the top search bar and breadcrumb bar into one | | `alertingPrometheusRulesPrimary` | Uses Prometheus rules as the primary source of truth for ruler-enabled data sources |
| `exploreLogsShardSplitting` | Used in Explore Logs to split queries into multiple queries based on the number of shards | | `singleTopNav` | Unifies the top search bar and breadcrumb bar into one |
| `exploreLogsAggregatedMetrics` | Used in Explore Logs to query by aggregated metrics | | `exploreLogsShardSplitting` | Used in Explore Logs to split queries into multiple queries based on the number of shards |
| `exploreLogsLimitedTimeRange` | Used in Explore Logs to limit the time range | | `exploreLogsAggregatedMetrics` | Used in Explore Logs to query by aggregated metrics |
| `homeSetupGuide` | Used in Home for users who want to return to the onboarding flow or quickly find popular config pages | | `exploreLogsLimitedTimeRange` | Used in Explore Logs to limit the time range |
| `appSidecar` | Enable the app sidecar feature that allows rendering 2 apps at the same time | | `homeSetupGuide` | Used in Home for users who want to return to the onboarding flow or quickly find popular config pages |
| `alertingQueryAndExpressionsStepMode` | Enables step mode for alerting queries and expressions | | `appSidecar` | Enable the app sidecar feature that allows rendering 2 apps at the same time |
| `rolePickerDrawer` | Enables the new role picker drawer design | | `alertingQueryAndExpressionsStepMode` | Enables step mode for alerting queries and expressions |
| `rolePickerDrawer` | Enables the new role picker drawer design |
## Development feature toggles ## Development feature toggles

@ -117,6 +117,7 @@ export interface FeatureToggles {
kubernetesSnapshots?: boolean; kubernetesSnapshots?: boolean;
kubernetesDashboards?: boolean; kubernetesDashboards?: boolean;
kubernetesFolders?: boolean; kubernetesFolders?: boolean;
grafanaAPIServerTestingWithExperimentalAPIs?: boolean;
datasourceQueryTypes?: boolean; datasourceQueryTypes?: boolean;
queryService?: boolean; queryService?: boolean;
queryServiceRewrite?: boolean; queryServiceRewrite?: boolean;

@ -47,8 +47,8 @@ func RegisterAPIService(cfg *setting.Cfg,
accessControl accesscontrol.AccessControl, accessControl accesscontrol.AccessControl,
registerer prometheus.Registerer, registerer prometheus.Registerer,
) *FolderAPIBuilder { ) *FolderAPIBuilder {
if !features.IsEnabledGlobally(featuremgmt.FlagKubernetesFolders) { if !features.IsEnabledGlobally(featuremgmt.FlagKubernetesFolders) && !features.IsEnabledGlobally(featuremgmt.FlagGrafanaAPIServerTestingWithExperimentalAPIs) {
return nil // skip registration unless opting into Kubernetes folders return nil // skip registration unless opting into Kubernetes folders or unless we want to customise registration when testing
} }
builder := &FolderAPIBuilder{ builder := &FolderAPIBuilder{

@ -750,6 +750,12 @@ var (
Stage: FeatureStageExperimental, Stage: FeatureStageExperimental,
Owner: grafanaSearchAndStorageSquad, Owner: grafanaSearchAndStorageSquad,
}, },
{
Name: "grafanaAPIServerTestingWithExperimentalAPIs",
Description: "Facilitate integration testing of experimental APIs",
Stage: FeatureStageExperimental,
Owner: grafanaSearchAndStorageSquad,
},
{ {
Name: "datasourceQueryTypes", Name: "datasourceQueryTypes",
Description: "Show query type endpoints in datasource API servers (currently hardcoded for testdata, expressions, and prometheus)", Description: "Show query type endpoints in datasource API servers (currently hardcoded for testdata, expressions, and prometheus)",

@ -98,6 +98,7 @@ kubernetesPlaylists,GA,@grafana/grafana-app-platform-squad,false,true,false
kubernetesSnapshots,experimental,@grafana/grafana-app-platform-squad,false,true,false kubernetesSnapshots,experimental,@grafana/grafana-app-platform-squad,false,true,false
kubernetesDashboards,experimental,@grafana/grafana-app-platform-squad,false,false,true kubernetesDashboards,experimental,@grafana/grafana-app-platform-squad,false,false,true
kubernetesFolders,experimental,@grafana/search-and-storage,false,false,false kubernetesFolders,experimental,@grafana/search-and-storage,false,false,false
grafanaAPIServerTestingWithExperimentalAPIs,experimental,@grafana/search-and-storage,false,false,false
datasourceQueryTypes,experimental,@grafana/grafana-app-platform-squad,false,true,false datasourceQueryTypes,experimental,@grafana/grafana-app-platform-squad,false,true,false
queryService,experimental,@grafana/grafana-app-platform-squad,false,true,false queryService,experimental,@grafana/grafana-app-platform-squad,false,true,false
queryServiceRewrite,experimental,@grafana/grafana-app-platform-squad,false,true,false queryServiceRewrite,experimental,@grafana/grafana-app-platform-squad,false,true,false

1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
98 kubernetesSnapshots experimental @grafana/grafana-app-platform-squad false true false
99 kubernetesDashboards experimental @grafana/grafana-app-platform-squad false false true
100 kubernetesFolders experimental @grafana/search-and-storage false false false
101 grafanaAPIServerTestingWithExperimentalAPIs experimental @grafana/search-and-storage false false false
102 datasourceQueryTypes experimental @grafana/grafana-app-platform-squad false true false
103 queryService experimental @grafana/grafana-app-platform-squad false true false
104 queryServiceRewrite experimental @grafana/grafana-app-platform-squad false true false

@ -403,6 +403,10 @@ const (
// Use the kubernetes API in the frontend for folders, and route /api/folders requests to k8s // Use the kubernetes API in the frontend for folders, and route /api/folders requests to k8s
FlagKubernetesFolders = "kubernetesFolders" FlagKubernetesFolders = "kubernetesFolders"
// FlagGrafanaAPIServerTestingWithExperimentalAPIs
// Facilitate integration testing of experimental APIs
FlagGrafanaAPIServerTestingWithExperimentalAPIs = "grafanaAPIServerTestingWithExperimentalAPIs"
// FlagDatasourceQueryTypes // FlagDatasourceQueryTypes
// Show query type endpoints in datasource API servers (currently hardcoded for testdata, expressions, and prometheus) // Show query type endpoints in datasource API servers (currently hardcoded for testdata, expressions, and prometheus)
FlagDatasourceQueryTypes = "datasourceQueryTypes" FlagDatasourceQueryTypes = "datasourceQueryTypes"

@ -1384,6 +1384,18 @@
"requiresRestart": true "requiresRestart": true
} }
}, },
{
"metadata": {
"name": "grafanaAPIServerTestingWithExperimentalAPIs",
"resourceVersion": "1727945615419",
"creationTimestamp": "2024-10-03T08:53:35Z"
},
"spec": {
"description": "Facilitate integration testing of experimental APIs",
"stage": "experimental",
"codeowner": "@grafana/search-and-storage"
}
},
{ {
"metadata": { "metadata": {
"name": "grafanaAPIServerWithExperimentalAPIs", "name": "grafanaAPIServerWithExperimentalAPIs",

@ -40,8 +40,10 @@ func TestIntegrationFoldersApp(t *testing.T) {
helper := apis.NewK8sTestHelper(t, testinfra.GrafanaOpts{ helper := apis.NewK8sTestHelper(t, testinfra.GrafanaOpts{
AppModeProduction: true, AppModeProduction: true,
EnableFeatureToggles: []string{ EnableFeatureToggles: []string{
featuremgmt.FlagKubernetesFolders, featuremgmt.FlagGrafanaAPIServerTestingWithExperimentalAPIs,
}, },
// Not including featuremgmt.FlagKubernetesFolders because we refer to the k8s client directly in doFolderTests().
// This allows us to access the legacy api (which gets bypassed by featuremgmt.FlagKubernetesFolders).
}) })
t.Run("Check discovery client", func(t *testing.T) { t.Run("Check discovery client", func(t *testing.T) {
@ -108,8 +110,10 @@ func TestIntegrationFoldersApp(t *testing.T) {
AppModeProduction: true, AppModeProduction: true,
DisableAnonymous: true, DisableAnonymous: true,
EnableFeatureToggles: []string{ EnableFeatureToggles: []string{
featuremgmt.FlagKubernetesFolders, featuremgmt.FlagGrafanaAPIServerTestingWithExperimentalAPIs,
}, },
// Not including featuremgmt.FlagKubernetesFolders because we refer to the k8s client directly in doFolderTests().
// This allows us to access the legacy api (which gets bypassed by featuremgmt.FlagKubernetesFolders).
})) }))
}) })
@ -124,8 +128,10 @@ func TestIntegrationFoldersApp(t *testing.T) {
}, },
}, },
EnableFeatureToggles: []string{ EnableFeatureToggles: []string{
featuremgmt.FlagKubernetesFolders, featuremgmt.FlagGrafanaAPIServerTestingWithExperimentalAPIs,
}, },
// Not including featuremgmt.FlagKubernetesFolders because we refer to the k8s client directly in doFolderTests().
// This allows us to access the legacy api (which gets bypassed by featuremgmt.FlagKubernetesFolders).
})) }))
}) })
@ -140,8 +146,10 @@ func TestIntegrationFoldersApp(t *testing.T) {
}, },
}, },
EnableFeatureToggles: []string{ EnableFeatureToggles: []string{
featuremgmt.FlagKubernetesFolders, featuremgmt.FlagGrafanaAPIServerTestingWithExperimentalAPIs,
}, },
// Not including featuremgmt.FlagKubernetesFolders because we refer to the k8s client directly in doFolderTests().
// This allows us to access the legacy api (which gets bypassed by featuremgmt.FlagKubernetesFolders).
})) }))
}) })
@ -156,8 +164,10 @@ func TestIntegrationFoldersApp(t *testing.T) {
}, },
}, },
EnableFeatureToggles: []string{ EnableFeatureToggles: []string{
featuremgmt.FlagKubernetesFolders, featuremgmt.FlagGrafanaAPIServerTestingWithExperimentalAPIs,
}, },
// Not including featuremgmt.FlagKubernetesFolders because we refer to the k8s client directly in doFolderTests().
// This allows us to access the legacy api (which gets bypassed by featuremgmt.FlagKubernetesFolders).
})) }))
}) })
@ -172,8 +182,10 @@ func TestIntegrationFoldersApp(t *testing.T) {
}, },
}, },
EnableFeatureToggles: []string{ EnableFeatureToggles: []string{
featuremgmt.FlagKubernetesFolders, featuremgmt.FlagGrafanaAPIServerTestingWithExperimentalAPIs,
}, },
// Not including featuremgmt.FlagKubernetesFolders because we refer to the k8s client directly in doFolderTests().
// This allows us to access the legacy api (which gets bypassed by featuremgmt.FlagKubernetesFolders).
})) }))
}) })
@ -188,8 +200,10 @@ func TestIntegrationFoldersApp(t *testing.T) {
}, },
}, },
EnableFeatureToggles: []string{ EnableFeatureToggles: []string{
featuremgmt.FlagKubernetesFolders, featuremgmt.FlagGrafanaAPIServerTestingWithExperimentalAPIs,
}, },
// Not including featuremgmt.FlagKubernetesFolders because we refer to the k8s client directly in doFolderTests().
// This allows us to access the legacy api (which gets bypassed by featuremgmt.FlagKubernetesFolders).
})) }))
}) })
@ -204,8 +218,10 @@ func TestIntegrationFoldersApp(t *testing.T) {
}, },
}, },
EnableFeatureToggles: []string{ EnableFeatureToggles: []string{
featuremgmt.FlagKubernetesFolders, featuremgmt.FlagGrafanaAPIServerTestingWithExperimentalAPIs,
}, },
// Not including featuremgmt.FlagKubernetesFolders because we refer to the k8s client directly in doFolderTests().
// This allows us to access the legacy api (which gets bypassed by featuremgmt.FlagKubernetesFolders).
})) }))
}) })
@ -223,8 +239,10 @@ func TestIntegrationFoldersApp(t *testing.T) {
}, },
}, },
EnableFeatureToggles: []string{ EnableFeatureToggles: []string{
featuremgmt.FlagKubernetesFolders, featuremgmt.FlagGrafanaAPIServerTestingWithExperimentalAPIs,
}, },
// Not including featuremgmt.FlagKubernetesFolders because we refer to the k8s client directly in doFolderTests().
// This allows us to access the legacy api (which gets bypassed by featuremgmt.FlagKubernetesFolders).
}) })
// Clear the collection before starting (etcd) // Clear the collection before starting (etcd)
@ -252,8 +270,10 @@ func TestIntegrationFoldersApp(t *testing.T) {
}, },
}, },
EnableFeatureToggles: []string{ EnableFeatureToggles: []string{
featuremgmt.FlagKubernetesFolders, featuremgmt.FlagGrafanaAPIServerTestingWithExperimentalAPIs,
}, },
// Not including featuremgmt.FlagKubernetesFolders because we refer to the k8s client directly in doFolderTests().
// This allows us to access the legacy api (which gets bypassed by featuremgmt.FlagKubernetesFolders).
}) })
// Clear the collection before starting (etcd) // Clear the collection before starting (etcd)

Loading…
Cancel
Save