From 65b5f94a478d307c858cf0a34ec0145b882d050b Mon Sep 17 00:00:00 2001 From: Rashmi Kulkarni Date: Mon, 14 Sep 2020 12:36:33 -0700 Subject: [PATCH] Remote cluster - Functional UI test to change the superuser to a test_user with limited role (#77212) * wip - remote cluster * update chromedriver to 85 * remote cluster test_user * Revert "update chromedriver to 85" This reverts commit 4abbc547eda7279965106f03598fae38757513fb. Co-authored-by: Dzmitry Lemechko Co-authored-by: Elastic Machine --- x-pack/test/functional/apps/remote_clusters/home_page.ts | 6 ++++++ x-pack/test/functional/apps/remote_clusters/index.ts | 3 +++ x-pack/test/functional/config.js | 1 + 3 files changed, 10 insertions(+) diff --git a/x-pack/test/functional/apps/remote_clusters/home_page.ts b/x-pack/test/functional/apps/remote_clusters/home_page.ts index 698d9e25e5bb27..29473e34af5ec8 100644 --- a/x-pack/test/functional/apps/remote_clusters/home_page.ts +++ b/x-pack/test/functional/apps/remote_clusters/home_page.ts @@ -9,12 +9,18 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { const pageObjects = getPageObjects(['common', 'remoteClusters']); + const security = getService('security'); describe('Home page', function () { before(async () => { + await security.testUser.setRoles(['global_ccr_role']); await pageObjects.common.navigateToApp('remoteClusters'); }); + after(async () => { + await security.testUser.restoreDefaults(); + }); + it('Loads the app', async () => { const remoteClusterButton = await pageObjects.remoteClusters.remoteClusterCreateButton(); expect(await remoteClusterButton.isDisplayed()).to.be(true); diff --git a/x-pack/test/functional/apps/remote_clusters/index.ts b/x-pack/test/functional/apps/remote_clusters/index.ts index 0839c2f22af477..1c870dc6fcad2e 100644 --- a/x-pack/test/functional/apps/remote_clusters/index.ts +++ b/x-pack/test/functional/apps/remote_clusters/index.ts @@ -6,6 +6,9 @@ import { FtrProviderContext } from '../../ftr_provider_context'; +// refer to the below docs for CCR, Remote Clusters +// https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-getting-started.html#ccr-getting-started-prerequisites +// https://www.elastic.co/guide/en/kibana/7.9/working-remote-clusters.html export default ({ loadTestFile }: FtrProviderContext) => { describe('Remote Clusters app', function () { this.tags(['ciGroup4', 'skipCloud']); diff --git a/x-pack/test/functional/config.js b/x-pack/test/functional/config.js index d1164c8c85362e..360d66d2239370 100644 --- a/x-pack/test/functional/config.js +++ b/x-pack/test/functional/config.js @@ -334,6 +334,7 @@ export default async function ({ readConfigFile }) { ], }, + // using this role even for remote clusters global_ccr_role: { elasticsearch: { cluster: ['manage', 'manage_ccr'],