Skip to content

Commit

Permalink
[Discover] Fix functional time picker test permissions (elastic#78564) (
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal authored Sep 30, 2020
1 parent 2efee0b commit 7e8798e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const security = getService('security');
const PageObjects = getPageObjects(['common', 'timePicker', 'discover']);

describe('indexpattern without timefield', () => {
before(async () => {
await security.testUser.setRoles(['kibana_admin', 'kibana_timefield']);
await esArchiver.loadIfNeeded('index_pattern_without_timefield');
await kibanaServer.uiSettings.replace({ defaultIndex: 'without-timefield' });
await PageObjects.common.navigateToApp('discover');
});

after(async () => {
await security.testUser.restoreDefaults();
await esArchiver.unload('index_pattern_without_timefield');
});

Expand Down
15 changes: 15 additions & 0 deletions test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,21 @@ export default async function ({ readConfigFile }) {
kibana: [],
},

kibana_timefield: {
elasticsearch: {
cluster: [],
indices: [
{
names: ['without-timefield', 'with-timefield'],
privileges: ['read', 'view_index_metadata'],
field_security: { grant: ['*'], except: [] },
},
],
run_as: [],
},
kibana: [],
},

kibana_large_strings: {
elasticsearch: {
cluster: [],
Expand Down

0 comments on commit 7e8798e

Please sign in to comment.