Skip to content

Commit

Permalink
Search profiler functional test -- using "test_user" with limited rol…
Browse files Browse the repository at this point in the history
…e. (#69841)

* using test_user with limited read permission to search profiler test

* gitcheck

* search profiler test using test_user
  • Loading branch information
rashmivkulkarni authored Jun 25, 2020
1 parent 86895ef commit e79e84c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,21 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const aceEditor = getService('aceEditor');
const retry = getService('retry');
const security = getService('security');

const editorTestSubjectSelector = 'searchProfilerEditor';

describe('Search Profiler Editor', () => {
before(async () => {
await security.testUser.setRoles(['global_devtools_read']);
await PageObjects.common.navigateToApp('searchProfiler');
expect(await testSubjects.exists('searchProfilerEditor')).to.be(true);
});

after(async () => {
await security.testUser.restoreDefaults();
});

it('correctly parses triple quotes in JSON', async () => {
// The below inputs are written to work _with_ ace's autocomplete unlike console's unit test
// counterparts in src/legacy/core_plugins/console/public/tests/src/editor.test.js
Expand Down
11 changes: 11 additions & 0 deletions x-pack/test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,17 @@ export default async function ({ readConfigFile }) {
],
},

global_devtools_read: {
kibana: [
{
feature: {
dev_tools: ['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 e79e84c

Please sign in to comment.