Skip to content

Commit 6f7a85f

Browse files
committed
Move data stream index pattern creation test to xpack (#71511)
* Move data stream index pattern creation test to xpack
1 parent 831181d commit 6f7a85f

4 files changed

Lines changed: 68 additions & 36 deletions

File tree

test/functional/apps/management/_create_index_pattern_wizard.js

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -51,42 +51,6 @@ export default function ({ getService, getPageObjects }) {
5151
});
5252
});
5353

54-
describe('data streams', () => {
55-
it('can be an index pattern', async () => {
56-
await es.transport.request({
57-
path: '/_index_template/generic-logs',
58-
method: 'PUT',
59-
body: {
60-
index_patterns: ['logs-*', 'test_data_stream'],
61-
template: {
62-
mappings: {
63-
properties: {
64-
'@timestamp': {
65-
type: 'date',
66-
},
67-
},
68-
},
69-
},
70-
data_stream: {
71-
timestamp_field: '@timestamp',
72-
},
73-
},
74-
});
75-
76-
await es.transport.request({
77-
path: '/_data_stream/test_data_stream',
78-
method: 'PUT',
79-
});
80-
81-
await PageObjects.settings.createIndexPattern('test_data_stream', false);
82-
83-
await es.transport.request({
84-
path: '/_data_stream/test_data_stream',
85-
method: 'DELETE',
86-
});
87-
});
88-
});
89-
9054
describe('index alias', () => {
9155
it('can be an index pattern', async () => {
9256
await es.transport.request({
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
export default function ({ getService, getPageObjects }) {
8+
const kibanaServer = getService('kibanaServer');
9+
const es = getService('legacyEs');
10+
const PageObjects = getPageObjects(['settings', 'common']);
11+
12+
describe('"Create Index Pattern" wizard', function () {
13+
before(async function () {
14+
// delete .kibana index and then wait for Kibana to re-create it
15+
await kibanaServer.uiSettings.replace({});
16+
await PageObjects.settings.navigateTo();
17+
await PageObjects.settings.clickKibanaIndexPatterns();
18+
});
19+
20+
describe('data streams', () => {
21+
it('can be an index pattern', async () => {
22+
await es.transport.request({
23+
path: '/_index_template/generic-logs',
24+
method: 'PUT',
25+
body: {
26+
index_patterns: ['logs-*', 'test_data_stream'],
27+
template: {
28+
mappings: {
29+
properties: {
30+
'@timestamp': {
31+
type: 'date',
32+
},
33+
},
34+
},
35+
},
36+
data_stream: {},
37+
},
38+
});
39+
40+
await es.transport.request({
41+
path: '/_data_stream/test_data_stream',
42+
method: 'PUT',
43+
});
44+
45+
await PageObjects.settings.createIndexPattern('test_data_stream', false);
46+
47+
await es.transport.request({
48+
path: '/_data_stream/test_data_stream',
49+
method: 'DELETE',
50+
});
51+
});
52+
});
53+
});
54+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
export default function ({ loadTestFile }) {
8+
describe('management', function () {
9+
this.tags(['ciGroup2']);
10+
11+
loadTestFile(require.resolve('./create_index_pattern_wizard'));
12+
});
13+
}

x-pack/test/functional/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export default async function ({ readConfigFile }) {
5757
resolve(__dirname, './apps/remote_clusters'),
5858
resolve(__dirname, './apps/transform'),
5959
resolve(__dirname, './apps/reporting_management'),
60+
resolve(__dirname, './apps/management'),
6061

6162
// This license_management file must be last because it is destructive.
6263
resolve(__dirname, './apps/license_management'),

0 commit comments

Comments
 (0)