From 18509cc5c084b62cc8a7e2bd3153174640d5751c Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Tue, 18 Aug 2020 11:43:08 +0200 Subject: [PATCH] Add roles to fix histogram tests --- test/functional/apps/discover/_discover_histogram.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/functional/apps/discover/_discover_histogram.ts b/test/functional/apps/discover/_discover_histogram.ts index 5c78bfccbb966..e06783174e83b 100644 --- a/test/functional/apps/discover/_discover_histogram.ts +++ b/test/functional/apps/discover/_discover_histogram.ts @@ -24,6 +24,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const elasticChart = getService('elasticChart'); const kibanaServer = getService('kibanaServer'); + const security = getService('security'); const PageObjects = getPageObjects(['settings', 'common', 'discover', 'header', 'timePicker']); const defaultSettings = { defaultIndex: 'long-window-logstash-*', @@ -35,12 +36,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await esArchiver.loadIfNeeded('logstash_functional'); await esArchiver.load('long_window_logstash'); await esArchiver.load('long_window_logstash_index_pattern'); + await security.testUser.setRoles(['kibana_admin', 'long_window_logstash']); await kibanaServer.uiSettings.replace(defaultSettings); await PageObjects.common.navigateToApp('discover'); }); after(async () => { await esArchiver.unload('long_window_logstash'); await esArchiver.unload('long_window_logstash_index_pattern'); + await security.testUser.restoreDefaults(); }); async function prepareTest(fromTime: string, toTime: string, interval: string) {