mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Move data stream index pattern creation test to xpack (#71511)
* Move data stream index pattern creation test to xpack
This commit is contained in:
parent
06355e8bb7
commit
9ba750e852
4 changed files with 68 additions and 36 deletions
|
@ -51,42 +51,6 @@ export default function ({ getService, getPageObjects }) {
|
|||
});
|
||||
});
|
||||
|
||||
describe('data streams', () => {
|
||||
it('can be an index pattern', async () => {
|
||||
await es.transport.request({
|
||||
path: '/_index_template/generic-logs',
|
||||
method: 'PUT',
|
||||
body: {
|
||||
index_patterns: ['logs-*', 'test_data_stream'],
|
||||
template: {
|
||||
mappings: {
|
||||
properties: {
|
||||
'@timestamp': {
|
||||
type: 'date',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
data_stream: {
|
||||
timestamp_field: '@timestamp',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
await es.transport.request({
|
||||
path: '/_data_stream/test_data_stream',
|
||||
method: 'PUT',
|
||||
});
|
||||
|
||||
await PageObjects.settings.createIndexPattern('test_data_stream', false);
|
||||
|
||||
await es.transport.request({
|
||||
path: '/_data_stream/test_data_stream',
|
||||
method: 'DELETE',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('index alias', () => {
|
||||
it('can be an index pattern', async () => {
|
||||
await es.transport.request({
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License;
|
||||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
export default function ({ getService, getPageObjects }) {
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const es = getService('legacyEs');
|
||||
const PageObjects = getPageObjects(['settings', 'common']);
|
||||
|
||||
describe('"Create Index Pattern" wizard', function () {
|
||||
before(async function () {
|
||||
// delete .kibana index and then wait for Kibana to re-create it
|
||||
await kibanaServer.uiSettings.replace({});
|
||||
await PageObjects.settings.navigateTo();
|
||||
await PageObjects.settings.clickKibanaIndexPatterns();
|
||||
});
|
||||
|
||||
describe('data streams', () => {
|
||||
it('can be an index pattern', async () => {
|
||||
await es.transport.request({
|
||||
path: '/_index_template/generic-logs',
|
||||
method: 'PUT',
|
||||
body: {
|
||||
index_patterns: ['logs-*', 'test_data_stream'],
|
||||
template: {
|
||||
mappings: {
|
||||
properties: {
|
||||
'@timestamp': {
|
||||
type: 'date',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
data_stream: {},
|
||||
},
|
||||
});
|
||||
|
||||
await es.transport.request({
|
||||
path: '/_data_stream/test_data_stream',
|
||||
method: 'PUT',
|
||||
});
|
||||
|
||||
await PageObjects.settings.createIndexPattern('test_data_stream', false);
|
||||
|
||||
await es.transport.request({
|
||||
path: '/_data_stream/test_data_stream',
|
||||
method: 'DELETE',
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
13
x-pack/test/functional/apps/management/index.js
Normal file
13
x-pack/test/functional/apps/management/index.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License;
|
||||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
export default function ({ loadTestFile }) {
|
||||
describe('management', function () {
|
||||
this.tags(['ciGroup2']);
|
||||
|
||||
loadTestFile(require.resolve('./create_index_pattern_wizard'));
|
||||
});
|
||||
}
|
|
@ -57,6 +57,7 @@ export default async function ({ readConfigFile }) {
|
|||
resolve(__dirname, './apps/remote_clusters'),
|
||||
resolve(__dirname, './apps/transform'),
|
||||
resolve(__dirname, './apps/reporting_management'),
|
||||
resolve(__dirname, './apps/management'),
|
||||
|
||||
// This license_management file must be last because it is destructive.
|
||||
resolve(__dirname, './apps/license_management'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue