mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
split date_nested kbn_archive out of es_archive (#124646)
* split kbn_archive out of es_archive * add missing unload of kbn_archive Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
df6d386d50
commit
b8abe763c9
6 changed files with 39 additions and 21 deletions
|
@ -13,10 +13,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const testSubjects = getService('testSubjects');
|
||||
const PageObjects = getPageObjects(['common', 'timePicker', 'discover']);
|
||||
const security = getService('security');
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
|
||||
describe('timefield is a date in a nested field', function () {
|
||||
before(async function () {
|
||||
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/date_nested');
|
||||
await kibanaServer.importExport.load(
|
||||
'test/functional/fixtures/kbn_archiver/date_nested.json'
|
||||
);
|
||||
await security.testUser.setRoles(['kibana_admin', 'kibana_date_nested']);
|
||||
await PageObjects.common.navigateToApp('discover');
|
||||
});
|
||||
|
@ -24,6 +28,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
after(async function unloadMakelogs() {
|
||||
await security.testUser.restoreDefaults();
|
||||
await esArchiver.unload('test/functional/fixtures/es_archiver/date_nested');
|
||||
await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/date_nested');
|
||||
});
|
||||
|
||||
it('should show an error message', async function () {
|
||||
|
|
|
@ -42,6 +42,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] });
|
||||
|
||||
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json');
|
||||
await kibanaServer.importExport.load(
|
||||
'test/functional/fixtures/kbn_archiver/date_nested.json'
|
||||
);
|
||||
await esArchiver.load('test/functional/fixtures/es_archiver/date_nested');
|
||||
await esArchiver.load('test/functional/fixtures/es_archiver/logstash_functional');
|
||||
|
||||
|
@ -53,6 +56,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
after(async () => {
|
||||
await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover');
|
||||
await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/date_nested');
|
||||
await esArchiver.unload('test/functional/fixtures/es_archiver/date_nested');
|
||||
await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional');
|
||||
await PageObjects.common.unsetTime();
|
||||
|
|
|
@ -43,6 +43,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
// and load a set of data
|
||||
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional');
|
||||
await esArchiver.load('test/functional/fixtures/es_archiver/date_nested');
|
||||
await kibanaServer.importExport.load(
|
||||
'test/functional/fixtures/kbn_archiver/date_nested.json'
|
||||
);
|
||||
|
||||
await kibanaServer.uiSettings.replace(defaultSettings);
|
||||
await PageObjects.common.navigateToApp('discover');
|
||||
|
@ -50,7 +53,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
after(async () => {
|
||||
await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover');
|
||||
await esArchiver.load('test/functional/fixtures/es_archiver/date_nested');
|
||||
await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/date_nested');
|
||||
await esArchiver.unload('test/functional/fixtures/es_archiver/date_nested');
|
||||
await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional');
|
||||
});
|
||||
|
||||
|
|
|
@ -1,30 +1,13 @@
|
|||
{
|
||||
"type": "doc",
|
||||
"value": {
|
||||
"id": "index-pattern:date-nested",
|
||||
"index": ".kibana",
|
||||
"source": {
|
||||
"index-pattern": {
|
||||
"fields":"[]",
|
||||
"timeFieldName": "nested.timestamp",
|
||||
"title": "date-nested"
|
||||
},
|
||||
"type": "index-pattern"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
"type": "doc",
|
||||
"value": {
|
||||
"id": "date-nested-1",
|
||||
"index": "date-nested",
|
||||
"source": {
|
||||
"message" : "test",
|
||||
"message": "test",
|
||||
"nested": {
|
||||
"timestamp": "2021-06-30T12:00:00.123Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"type": "index",
|
||||
"value": {
|
||||
"aliases": {
|
||||
},
|
||||
"index": "date-nested",
|
||||
"mappings": {
|
||||
"properties": {
|
||||
|
@ -8,6 +10,11 @@
|
|||
"type": "text"
|
||||
},
|
||||
"nested": {
|
||||
"properties": {
|
||||
"timestamp": {
|
||||
"type": "date"
|
||||
}
|
||||
},
|
||||
"type": "nested"
|
||||
}
|
||||
}
|
||||
|
@ -19,4 +26,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
15
test/functional/fixtures/kbn_archiver/date_nested.json
Normal file
15
test/functional/fixtures/kbn_archiver/date_nested.json
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"attributes": {
|
||||
"fields": "[]",
|
||||
"timeFieldName": "nested.timestamp",
|
||||
"title": "date-nested"
|
||||
},
|
||||
"coreMigrationVersion": "8.2.0",
|
||||
"id": "date-nested",
|
||||
"migrationVersion": {
|
||||
"index-pattern": "8.0.0"
|
||||
},
|
||||
"references": [],
|
||||
"type": "index-pattern",
|
||||
"version": "WzIyLDFd"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue