Alerting: enable e2e tests to run in production mode (#45073)

* Alerting: run e2e tests in production mode

* adapt expected messages

* switch expected and actual to have the right order
This commit is contained in:
Jean-Philippe Quéméner
2022-02-09 10:26:06 +01:00
committed by GitHub
parent a025109647
commit 4fef791c7c
8 changed files with 68 additions and 36 deletions
+5
View File
@@ -236,6 +236,10 @@ func CreateGrafDir(t *testing.T, opts ...GrafanaOpts) (string, string) {
_, err = ngalertingSection.NewKey("alertmanager_config_poll_interval", o.NGAlertAlertmanagerConfigPollInterval.String())
require.NoError(t, err)
}
if o.AppModeProduction {
_, err = dfltSect.NewKey("app_mode", "production")
require.NoError(t, err)
}
if o.AnonymousUserRole != "" {
_, err = anonSect.NewKey("org_role", string(o.AnonymousUserRole))
require.NoError(t, err)
@@ -313,6 +317,7 @@ type GrafanaOpts struct {
CatalogAppEnabled bool
ViewersCanEdit bool
PluginAdminEnabled bool
AppModeProduction bool
DisableLegacyAlerting bool
EnableUnifiedAlerting bool
UnifiedAlertingDisabledOrgs []int64