Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote cluster - Functional UI test to change the superuser to a test_user with limited role #77212

Merged
merged 6 commits into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions x-pack/test/functional/apps/remote_clusters/home_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions x-pack/test/functional/apps/remote_clusters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down
1 change: 1 addition & 0 deletions x-pack/test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ export default async function ({ readConfigFile }) {
],
},

// using this role even for remote clusters
global_ccr_role: {
elasticsearch: {
cluster: ['manage', 'manage_ccr'],
Expand Down