mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Fix management test to run against cloud (#138656)
* Fix test to run against cloud * Keep original names
This commit is contained in:
parent
8f51b55a31
commit
94b51c4da5
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();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue