add negation index pattern functional test (#121594)

* add negation index pattern functional test
This commit is contained in:
Matthew Kime 2021-12-20 06:24:34 -06:00 committed by GitHub
parent ec31d8e079
commit 9a43472751
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,37 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import expect from '@kbn/expect';
export default function ({ getService, getPageObjects }) {
const PageObjects = getPageObjects(['settings']);
const es = getService('es');
describe('creating and deleting default index', function describeIndexTests() {
it('data view creation with exclusion', async () => {
await es.transport.request({
path: '/index-a/_doc',
method: 'POST',
body: { user: 'matt' },
});
await es.transport.request({
path: '/index-b/_doc',
method: 'POST',
body: { title: 'hello' },
});
await PageObjects.settings.createIndexPattern('index-*,-index-b');
const fieldCount = await PageObjects.settings.getFieldsTabCount();
// five metafields plus keyword and text version of 'user' field
expect(parseInt(fieldCount, 10)).to.be(7);
});
});
}

View file

@ -36,6 +36,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
loadTestFile(require.resolve('./_runtime_fields'));
loadTestFile(require.resolve('./_field_formatter'));
loadTestFile(require.resolve('./_legacy_url_redirect'));
loadTestFile(require.resolve('./_exclude_index_pattern'));
});
describe('', function () {