Skip to content

Commit

Permalink
using test_user with minimum privs (#71988) (#72199)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
rashmivkulkarni and elasticmachine authored Jul 17, 2020
1 parent 00e804f commit 1849651
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ export default function ({ getService, getPageObjects }) {
const esArchiver = getService('esArchiver');
const log = getService('log');
const testSubjects = getService('testSubjects');

const PageObjects = getPageObjects(['common', 'settings', 'discover', 'timePicker']);
const queryBar = getService('queryBar');
const security = getService('security');

describe('async search with scripted fields', function () {
this.tags(['skipFirefox']);

before(async function () {
await esArchiver.load('kibana_scripted_fields_on_logstash');
await esArchiver.loadIfNeeded('logstash_functional');
await security.testUser.setRoles(['test_logstash_reader', 'global_discover_read']);
// changing the timepicker default here saves us from having to set it in Discover (~8s)
await kibanaServer.uiSettings.update({
'timepicker:timeDefaults':
Expand All @@ -36,6 +37,7 @@ export default function ({ getService, getPageObjects }) {
await kibanaServer.uiSettings.update({});
await esArchiver.unload('logstash_functional');
await esArchiver.load('empty_kibana');
await security.testUser.restoreDefaults();
});

it('query should show failed shards pop up', async function () {
Expand Down

0 comments on commit 1849651

Please sign in to comment.