diff --git a/x-pack/test/functional/es_archives/reporting/scripted/data.json.gz b/x-pack/test/functional/es_archives/reporting/hugedata/data.json.gz similarity index 100% rename from x-pack/test/functional/es_archives/reporting/scripted/data.json.gz rename to x-pack/test/functional/es_archives/reporting/hugedata/data.json.gz diff --git a/x-pack/test/functional/es_archives/reporting/scripted/mappings.json b/x-pack/test/functional/es_archives/reporting/hugedata/mappings.json similarity index 100% rename from x-pack/test/functional/es_archives/reporting/scripted/mappings.json rename to x-pack/test/functional/es_archives/reporting/hugedata/mappings.json diff --git a/x-pack/test/functional/es_archives/reporting/scripted_small/data.json.gz b/x-pack/test/functional/es_archives/reporting/scripted_small/data.json.gz new file mode 100644 index 0000000000000..581271426bdd4 Binary files /dev/null and b/x-pack/test/functional/es_archives/reporting/scripted_small/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/reporting/scripted_small/mappings.json b/x-pack/test/functional/es_archives/reporting/scripted_small/mappings.json new file mode 100644 index 0000000000000..8c192b21f822a --- /dev/null +++ b/x-pack/test/functional/es_archives/reporting/scripted_small/mappings.json @@ -0,0 +1,739 @@ +{ + "type": "index", + "value": { + "aliases": { + ".kibana": { + } + }, + "index": ".kibana_1", + "mappings": { + "_meta": { + "migrationMappingPropertyHashes": { + "apm-telemetry": "0383a570af33654a51c8a1352417bc6b", + "canvas-workpad": "b0a1706d356228dbdcb4a17e6b9eb231", + "config": "87aca8fdb053154f11383fce3dbf3edf", + "dashboard": "eb3789e1af878e73f85304333240f65f", + "graph-workspace": "cd7ba1330e6682e9cc00b78850874be1", + "index-pattern": "66eccb05066c5a89924f48a9e9736499", + "infrastructure-ui-source": "10acdf67d9a06d462e198282fd6d4b81", + "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", + "map": "23d7aa4a720d4938ccde3983f87bd58d", + "maps-telemetry": "a4229f8b16a6820c6d724b7e0c1f729d", + "migrationVersion": "4a1746014a75ade3a714e1db5763276f", + "ml-telemetry": "257fd1d4b4fdbb9cb4b8a3b27da201e9", + "namespace": "2f4316de49999235636386fe51dc06c1", + "references": "7997cf5a56cc02bdc9c93361bde732b0", + "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", + "search": "181661168bbadd1eff5902361e2a0d5c", + "server": "ec97f1c5da1a19609a60874e5af1100c", + "space": "0d5011d73a0ef2f0f615bb42f26f187e", + "telemetry": "e1c8bc94e443aefd9458932cc0697a4d", + "timelion-sheet": "9a2a2748877c7a7b582fef201ab1d4cf", + "type": "2f4316de49999235636386fe51dc06c1", + "updated_at": "00da57df13e94e9d98437d13ace4bfe0", + "upgrade-assistant-reindex-operation": "a53a20fe086b72c9a86da3cc12dad8a6", + "upgrade-assistant-telemetry": "56702cec857e0a9dacfb696655b4ff7b", + "url": "c7f66a0df8b1b52f17c28c4adb111105", + "user-action": "0d409297dc5ebe1e3a1da691c6ee32e3", + "visualization": "52d7a13ad68a150c4525b292d23e12cc" + } + }, + "dynamic": "strict", + "properties": { + "apm-telemetry": { + "properties": { + "has_any_services": { + "type": "boolean" + }, + "services_per_agent": { + "properties": { + "go": { + "null_value": 0, + "type": "long" + }, + "java": { + "null_value": 0, + "type": "long" + }, + "js-base": { + "null_value": 0, + "type": "long" + }, + "nodejs": { + "null_value": 0, + "type": "long" + }, + "python": { + "null_value": 0, + "type": "long" + }, + "ruby": { + "null_value": 0, + "type": "long" + }, + "rum-js": { + "null_value": 0, + "type": "long" + } + } + } + } + }, + "canvas-workpad": { + "dynamic": "false", + "properties": { + "@created": { + "type": "date" + }, + "@timestamp": { + "type": "date" + }, + "name": { + "fields": { + "keyword": { + "type": "keyword" + } + }, + "type": "text" + } + } + }, + "config": { + "dynamic": "true", + "properties": { + "buildNum": { + "type": "keyword" + }, + "dateFormat:tz": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + }, + "defaultIndex": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + }, + "search:queryLanguage": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + } + } + }, + "dashboard": { + "properties": { + "description": { + "type": "text" + }, + "hits": { + "type": "integer" + }, + "kibanaSavedObjectMeta": { + "properties": { + "searchSourceJSON": { + "type": "text" + } + } + }, + "optionsJSON": { + "type": "text" + }, + "panelsJSON": { + "type": "text" + }, + "refreshInterval": { + "properties": { + "display": { + "type": "keyword" + }, + "pause": { + "type": "boolean" + }, + "section": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "timeFrom": { + "type": "keyword" + }, + "timeRestore": { + "type": "boolean" + }, + "timeTo": { + "type": "keyword" + }, + "title": { + "type": "text" + }, + "uiStateJSON": { + "type": "text" + }, + "version": { + "type": "integer" + } + } + }, + "graph-workspace": { + "properties": { + "description": { + "type": "text" + }, + "kibanaSavedObjectMeta": { + "properties": { + "searchSourceJSON": { + "type": "text" + } + } + }, + "numLinks": { + "type": "integer" + }, + "numVertices": { + "type": "integer" + }, + "title": { + "type": "text" + }, + "version": { + "type": "integer" + }, + "wsState": { + "type": "text" + } + } + }, + "index-pattern": { + "properties": { + "fieldFormatMap": { + "type": "text" + }, + "fields": { + "type": "text" + }, + "intervalName": { + "type": "keyword" + }, + "notExpandable": { + "type": "boolean" + }, + "sourceFilters": { + "type": "text" + }, + "timeFieldName": { + "type": "keyword" + }, + "title": { + "type": "text" + }, + "type": { + "type": "keyword" + }, + "typeMeta": { + "type": "keyword" + } + } + }, + "infrastructure-ui-source": { + "properties": { + "description": { + "type": "text" + }, + "fields": { + "properties": { + "container": { + "type": "keyword" + }, + "host": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "tiebreaker": { + "type": "keyword" + }, + "timestamp": { + "type": "keyword" + } + } + }, + "logAlias": { + "type": "keyword" + }, + "metricAlias": { + "type": "keyword" + }, + "name": { + "type": "text" + } + } + }, + "kql-telemetry": { + "properties": { + "optInCount": { + "type": "long" + }, + "optOutCount": { + "type": "long" + } + } + }, + "map": { + "properties": { + "bounds": { + "type": "geo_shape" + }, + "description": { + "type": "text" + }, + "layerListJSON": { + "type": "text" + }, + "mapStateJSON": { + "type": "text" + }, + "title": { + "type": "text" + }, + "uiStateJSON": { + "type": "text" + }, + "version": { + "type": "integer" + } + } + }, + "maps-telemetry": { + "properties": { + "attributesPerMap": { + "properties": { + "dataSourcesCount": { + "properties": { + "avg": { + "type": "long" + }, + "max": { + "type": "long" + }, + "min": { + "type": "long" + } + } + }, + "emsVectorLayersCount": { + "dynamic": "true", + "type": "object" + }, + "layerTypesCount": { + "dynamic": "true", + "type": "object" + }, + "layersCount": { + "properties": { + "avg": { + "type": "long" + }, + "max": { + "type": "long" + }, + "min": { + "type": "long" + } + } + } + } + }, + "mapsTotalCount": { + "type": "long" + }, + "timeCaptured": { + "type": "date" + } + } + }, + "migrationVersion": { + "dynamic": "true", + "properties": { + "dashboard": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + }, + "index-pattern": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + }, + "search": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + }, + "visualization": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + } + } + }, + "ml-telemetry": { + "properties": { + "file_data_visualizer": { + "properties": { + "index_creation_count": { + "type": "long" + } + } + } + } + }, + "namespace": { + "type": "keyword" + }, + "references": { + "properties": { + "id": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + }, + "type": "nested" + }, + "sample-data-telemetry": { + "properties": { + "installCount": { + "type": "long" + }, + "unInstallCount": { + "type": "long" + } + } + }, + "search": { + "properties": { + "columns": { + "type": "keyword" + }, + "description": { + "type": "text" + }, + "hits": { + "type": "integer" + }, + "kibanaSavedObjectMeta": { + "properties": { + "searchSourceJSON": { + "type": "text" + } + } + }, + "sort": { + "type": "keyword" + }, + "title": { + "type": "text" + }, + "version": { + "type": "integer" + } + } + }, + "server": { + "properties": { + "uuid": { + "type": "keyword" + } + } + }, + "space": { + "properties": { + "_reserved": { + "type": "boolean" + }, + "disabledFeatures": { + "type": "keyword" + }, + "color": { + "type": "keyword" + }, + "description": { + "type": "text" + }, + "disabledFeatures": { + "type": "keyword" + }, + "initials": { + "type": "keyword" + }, + "name": { + "fields": { + "keyword": { + "ignore_above": 2048, + "type": "keyword" + } + }, + "type": "text" + } + } + }, + "telemetry": { + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "timelion-sheet": { + "properties": { + "description": { + "type": "text" + }, + "hits": { + "type": "integer" + }, + "kibanaSavedObjectMeta": { + "properties": { + "searchSourceJSON": { + "type": "text" + } + } + }, + "timelion_chart_height": { + "type": "integer" + }, + "timelion_columns": { + "type": "integer" + }, + "timelion_interval": { + "type": "keyword" + }, + "timelion_other_interval": { + "type": "keyword" + }, + "timelion_rows": { + "type": "integer" + }, + "timelion_sheet": { + "type": "text" + }, + "title": { + "type": "text" + }, + "version": { + "type": "integer" + } + } + }, + "type": { + "type": "keyword" + }, + "updated_at": { + "type": "date" + }, + "upgrade-assistant-reindex-operation": { + "dynamic": "true", + "properties": { + "indexName": { + "type": "keyword" + }, + "status": { + "type": "integer" + } + } + }, + "upgrade-assistant-telemetry": { + "properties": { + "features": { + "properties": { + "deprecation_logging": { + "properties": { + "enabled": { + "null_value": true, + "type": "boolean" + } + } + } + } + }, + "ui_open": { + "properties": { + "cluster": { + "null_value": 0, + "type": "long" + }, + "indices": { + "null_value": 0, + "type": "long" + }, + "overview": { + "null_value": 0, + "type": "long" + } + } + }, + "ui_reindex": { + "properties": { + "close": { + "null_value": 0, + "type": "long" + }, + "open": { + "null_value": 0, + "type": "long" + }, + "start": { + "null_value": 0, + "type": "long" + }, + "stop": { + "null_value": 0, + "type": "long" + } + } + } + } + }, + "url": { + "properties": { + "accessCount": { + "type": "long" + }, + "accessDate": { + "type": "date" + }, + "createDate": { + "type": "date" + }, + "url": { + "fields": { + "keyword": { + "ignore_above": 2048, + "type": "keyword" + } + }, + "type": "text" + } + } + }, + "user-action": { + "properties": { + "count": { + "type": "integer" + } + } + }, + "visualization": { + "properties": { + "description": { + "type": "text" + }, + "kibanaSavedObjectMeta": { + "properties": { + "searchSourceJSON": { + "type": "text" + } + } + }, + "savedSearchRefName": { + "type": "keyword" + }, + "title": { + "type": "text" + }, + "uiStateJSON": { + "type": "text" + }, + "version": { + "type": "integer" + }, + "visState": { + "type": "text" + } + } + } + } + }, + "settings": { + "index": { + "auto_expand_replicas": "0-1", + "number_of_replicas": "0", + "number_of_shards": "1" + } + } + } +} + +{ + "type": "index", + "value": { + "aliases": { + }, + "index": "babynames", + "mappings": { + "properties": { + "date": { + "type": "date" + }, + "gender": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "percent": { + "type": "float" + }, + "value": { + "type": "integer" + }, + "year": { + "type": "integer" + } + } + }, + "settings": { + "index": { + "number_of_replicas": "0", + "number_of_shards": "1" + } + } + } +} diff --git a/x-pack/test/reporting/api/generate/csv_saved_search.ts b/x-pack/test/reporting/api/generate/csv_saved_search.ts index 24354d8c47ba1..fb475cfaa7834 100644 --- a/x-pack/test/reporting/api/generate/csv_saved_search.ts +++ b/x-pack/test/reporting/api/generate/csv_saved_search.ts @@ -98,7 +98,7 @@ export default function({ getService }: { getService: any }) { it('With scripted fields and field formatters', async () => { // load test data that contains a saved search and documents - await esArchiver.load('reporting/scripted'); + await esArchiver.load('reporting/scripted_small'); const { status: resStatus, @@ -120,7 +120,7 @@ export default function({ getService }: { getService: any }) { expect(resType).to.eql('text/csv'); expect(resText).to.eql(CSV_RESULT_SCRIPTED); - await esArchiver.unload('reporting/scripted'); + await esArchiver.unload('reporting/scripted_small'); }); it('Formatted date_nanos data', async () => { @@ -186,7 +186,7 @@ export default function({ getService }: { getService: any }) { it('Stops at Max Size Reached', async () => { // load test data that contains a saved search and documents - await esArchiver.load('reporting/scripted'); + await esArchiver.load('reporting/hugedata'); const { status: resStatus, @@ -208,14 +208,14 @@ export default function({ getService }: { getService: any }) { expect(resType).to.eql('text/csv'); expect(resText).to.eql(CSV_RESULT_HUGE); - await esArchiver.unload('reporting/scripted'); + await esArchiver.unload('reporting/hugedata'); }); }); describe('Merge user state into the query', () => { it('for query', async () => { // load test data that contains a saved search and documents - await esArchiver.load('reporting/scripted'); + await esArchiver.load('reporting/scripted_small'); const params = { searchId: 'search:f34bf440-5014-11e9-bce7-4dabcb8bef24', @@ -239,12 +239,12 @@ export default function({ getService }: { getService: any }) { expect(resType).to.eql('text/csv'); expect(resText).to.eql(CSV_RESULT_SCRIPTED_REQUERY); - await esArchiver.unload('reporting/scripted'); + await esArchiver.unload('reporting/scripted_small'); }); it('for sort', async () => { // load test data that contains a saved search and documents - await esArchiver.load('reporting/scripted'); + await esArchiver.load('reporting/hugedata'); const { status: resStatus, @@ -266,15 +266,14 @@ export default function({ getService }: { getService: any }) { expect(resType).to.eql('text/csv'); expect(resText).to.eql(CSV_RESULT_SCRIPTED_RESORTED); - await esArchiver.unload('reporting/scripted'); + await esArchiver.unload('reporting/hugedata'); }); }); - // FLAKY: https://github.com/elastic/kibana/issues/37471 - describe.skip('Non-Immediate', () => { + describe('Non-Immediate', () => { it('using queries in job params', async () => { // load test data that contains a saved search and documents - await esArchiver.load('reporting/scripted'); + await esArchiver.load('reporting/scripted_small'); const params = { searchId: 'search:f34bf440-5014-11e9-bce7-4dabcb8bef24', @@ -362,7 +361,7 @@ export default function({ getService }: { getService: any }) { }, 5000); // x-pack/test/functional/config settings are inherited, uses 3 seconds for polling interval. }); - await esArchiver.unload('reporting/scripted'); + await esArchiver.unload('reporting/scripted_small'); }); }); }); diff --git a/x-pack/test/reporting/api/generate/fixtures.ts b/x-pack/test/reporting/api/generate/fixtures.ts index b52ef11f0f35f..f8ca41b95e202 100644 --- a/x-pack/test/reporting/api/generate/fixtures.ts +++ b/x-pack/test/reporting/api/generate/fixtures.ts @@ -82,32 +82,12 @@ export const CSV_RESULT_TIMELESS = `name,power `; export const CSV_RESULT_SCRIPTED = `date,year,name,value,"years_ago" -"1981-01-01T00:00:00.000Z",1981,Fetty,1763,38 -"1981-01-01T00:00:00.000Z",1981,Fonnie,2330,38 -"1981-01-01T00:00:00.000Z",1981,Farbara,6456,38 "1981-01-01T00:00:00.000Z",1981,Felinda,1886,38 -"1981-01-01T00:00:00.000Z",1981,Frenda,7162,38 -"1981-01-01T00:00:00.000Z",1981,Feth,3685,38 -"1981-01-01T00:00:00.000Z",1981,Feverly,1987,38 -"1981-01-01T00:00:00.000Z",1981,Fecky,1930,38 -"1980-01-01T00:00:00.000Z",1980,Fonnie,2748,39 -"1980-01-01T00:00:00.000Z",1980,Frenda,8335,39 -"1980-01-01T00:00:00.000Z",1980,Fetty,1967,39 -"1980-01-01T00:00:00.000Z",1980,Farbara,8026,39 -"1980-01-01T00:00:00.000Z",1980,Feth,4246,39 -"1980-01-01T00:00:00.000Z",1980,Feverly,2249,39 "1980-01-01T00:00:00.000Z",1980,Fecky,2071,39 `; export const CSV_RESULT_SCRIPTED_REQUERY = `date,year,name,value,"years_ago" -"1981-01-01T00:00:00.000Z",1981,Fetty,1763,38 "1981-01-01T00:00:00.000Z",1981,Felinda,1886,38 -"1981-01-01T00:00:00.000Z",1981,Feth,3685,38 -"1981-01-01T00:00:00.000Z",1981,Feverly,1987,38 -"1981-01-01T00:00:00.000Z",1981,Fecky,1930,38 -"1980-01-01T00:00:00.000Z",1980,Fetty,1967,39 -"1980-01-01T00:00:00.000Z",1980,Feth,4246,39 -"1980-01-01T00:00:00.000Z",1980,Feverly,2249,39 "1980-01-01T00:00:00.000Z",1980,Fecky,2071,39 `;