Skip to content

Commit

Permalink
changes to the test_api_keys role
Browse files Browse the repository at this point in the history
  • Loading branch information
rashmivkulkarni committed Mar 25, 2020
1 parent d415596 commit 7079fe1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion x-pack/test/functional/apps/api_keys/home_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
});

it('Loads the app', async () => {
await security.testUser.setRoles(['kibana_admin', 'test_api_keys']);
await security.testUser.setRoles(['test_api_keys']);
log.debug('Checking for section header');
const headerText = await pageObjects.apiKeys.noAPIKeysHeading();
expect(headerText).to.be('No API keys');
Expand Down
9 changes: 9 additions & 0 deletions x-pack/test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,19 @@ export default async function({ readConfigFile }) {
kibana: [],
},

//Kibana feature privilege isn't specific to advancedSetting. It can be anything. https://github.com/elastic/kibana/issues/35965
test_api_keys: {
elasticsearch: {
cluster: ['manage_security', 'manage_api_key'],
},
kibana: [
{
feature: {
advancedSettings: ['read'],
},
spaces: ['default'],
},
],
},
},
defaultRoles: ['superuser'],
Expand Down
4 changes: 1 addition & 3 deletions x-pack/test/functional/page_objects/api_keys_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ export function ApiKeysPageProvider({ getService }: FtrProviderContext) {
},

async apiKeysPermissionDeniedMessage() {
const messageElement = await testSubjects.find('apiKeysPermissionDeniedMessage');
const message = await messageElement.getVisibleText();
return message;
return await testSubjects.getVisibleText('apiKeysPermissionDeniedMessage');
},
};
}

0 comments on commit 7079fe1

Please sign in to comment.