mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* Fix test to run against cloud
* Keep original names
(cherry picked from commit 94b51c4da5
)
Co-authored-by: liza-mae <liza-mae@users.noreply.github.com>
This commit is contained in:
parent
fc9060a86b
commit
3730c97ad0
2 changed files with 49 additions and 3 deletions
|
@ -12,9 +12,12 @@ import { FtrProviderContext } from '../../ftr_provider_context';
|
|||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const PageObjects = getPageObjects(['settings']);
|
||||
const es = getService('es');
|
||||
const security = getService('security');
|
||||
|
||||
describe('creating and deleting default index', function describeIndexTests() {
|
||||
it('data view creation with exclusion', async () => {
|
||||
before(async function () {
|
||||
await security.testUser.setRoles(['kibana_admin', 'index_a', 'index_b']);
|
||||
await PageObjects.settings.navigateTo();
|
||||
await es.transport.request({
|
||||
path: '/index-a/_doc',
|
||||
method: 'POST',
|
||||
|
@ -26,13 +29,26 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
method: 'POST',
|
||||
body: { title: 'hello' },
|
||||
});
|
||||
|
||||
await PageObjects.settings.createIndexPattern('index-*,-index-b');
|
||||
});
|
||||
|
||||
it('data view creation with exclusion', async () => {
|
||||
const fieldCount = await PageObjects.settings.getFieldsTabCount();
|
||||
|
||||
// five metafields plus keyword and text version of 'user' field
|
||||
expect(parseInt(fieldCount, 10)).to.be(6);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await es.transport.request({
|
||||
path: '/index-a',
|
||||
method: 'DELETE',
|
||||
});
|
||||
await es.transport.request({
|
||||
path: '/index-b',
|
||||
method: 'DELETE',
|
||||
});
|
||||
await PageObjects.settings.removeIndexPattern();
|
||||
await security.testUser.restoreDefaults();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -249,6 +249,36 @@ export default async function ({ readConfigFile }) {
|
|||
kibana: [],
|
||||
},
|
||||
|
||||
index_a: {
|
||||
elasticsearch: {
|
||||
cluster: [],
|
||||
indices: [
|
||||
{
|
||||
names: ['index-a'],
|
||||
privileges: ['read', 'view_index_metadata', 'manage', 'create_index', 'index'],
|
||||
field_security: { grant: ['*'], except: [] },
|
||||
},
|
||||
],
|
||||
run_as: [],
|
||||
},
|
||||
kibana: [],
|
||||
},
|
||||
|
||||
index_b: {
|
||||
elasticsearch: {
|
||||
cluster: [],
|
||||
indices: [
|
||||
{
|
||||
names: ['index-b'],
|
||||
privileges: ['read', 'view_index_metadata', 'manage', 'create_index', 'index'],
|
||||
field_security: { grant: ['*'], except: [] },
|
||||
},
|
||||
],
|
||||
run_as: [],
|
||||
},
|
||||
kibana: [],
|
||||
},
|
||||
|
||||
kibana_sample_read: {
|
||||
elasticsearch: {
|
||||
cluster: [],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue