Fix field formatters test on cloud (#109707) (#109851)

Co-authored-by: liza-mae <liza-mae@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2021-08-24 12:37:23 -04:00 committed by GitHub
parent ee3b2f5030
commit b1c0879b11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View file

@ -17,6 +17,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const browser = getService('browser');
const PageObjects = getPageObjects(['settings', 'common']);
const testSubjects = getService('testSubjects');
const security = getService('security');
const es = getService('es');
const indexPatterns = getService('indexPatterns');
const toasts = getService('toasts');
@ -26,9 +27,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
before(async function () {
await browser.setWindowSize(1200, 800);
await security.testUser.setRoles([
'kibana_admin',
'test_field_formatters',
'test_logstash_reader',
]);
await esArchiver.load('test/functional/fixtures/es_archiver/discover');
await kibanaServer.uiSettings.replace({});
await kibanaServer.uiSettings.update({});
});
after(async function afterAll() {

View file

@ -178,6 +178,20 @@ export default async function ({ readConfigFile }) {
},
kibana: [],
},
test_field_formatters: {
elasticsearch: {
cluster: [],
indices: [
{
names: ['field_formats_management_functional_tests*'],
privileges: ['read', 'view_index_metadata'],
field_security: { grant: ['*'], except: [] },
},
],
run_as: [],
},
kibana: [],
},
//for sample data - can remove but not add sample data.( not ml)- for ml use built in role.
kibana_sample_admin: {
elasticsearch: {