Skip to content

Commit 11db557

Browse files
using test_user with minimum privs (#71988) (#72200)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent ecc4bf8 commit 11db557

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

x-pack/test/functional/apps/discover/async_scripted_fields.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@ export default function ({ getService, getPageObjects }) {
1414
const esArchiver = getService('esArchiver');
1515
const log = getService('log');
1616
const testSubjects = getService('testSubjects');
17-
1817
const PageObjects = getPageObjects(['common', 'settings', 'discover', 'timePicker']);
1918
const queryBar = getService('queryBar');
19+
const security = getService('security');
2020

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

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

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

0 commit comments

Comments
 (0)