Skip to content

Commit

Permalink
wip - remote cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
rashmivkulkarni committed Sep 10, 2020
1 parent e4aaed6 commit 7f9b8a7
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
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_remote_cluster_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
2 changes: 2 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,8 @@

import { FtrProviderContext } from '../../ftr_provider_context';

// 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
39 changes: 39 additions & 0 deletions x-pack/test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,45 @@ export default async function ({ readConfigFile }) {
],
},

global_upgrade_assistant_role: {
elasticsearch: {
cluster: ['manage'],
},
kibana: [
{
feature: {
discover: ['read'],
},
spaces: ['*'],
},
],
},

global_ccr_role: {
elasticsearch: {
cluster: ['manage', 'manage_ccr'],
},
kibana: [
{
feature: {
discover: ['read'],
},
spaces: ['*'],
},
],
},

global_remote_cluster_role: {
kibana: [
{
feature: {
advancedSettings: ['read'],
},
spaces: ['*'],
},
],
},

//Kibana feature privilege isn't specific to advancedSetting. It can be anything. https://github.com/elastic/kibana/issues/35965
test_api_keys: {
elasticsearch: {
Expand Down

0 comments on commit 7f9b8a7

Please sign in to comment.