mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* remove unused * remove kibana objects from reporting es_archives * import objects using kibanaServer for tests * consolidate ecommerce_kibana_spaces * self-review * fix nanos test * fix loading of reporting/ecommerce_kibana_spaces * fix csv snapshots * fix more csv tests * archive rename * consolidate canvas_disallowed_url archive * clean up snapshots * fix CSV tests * polish * remove unused * Update x-pack/test/reporting_api_integration/reporting_and_security/network_policy.ts
This commit is contained in:
parent
181b042a82
commit
fc96462343
29 changed files with 775 additions and 8723 deletions
|
@ -16,7 +16,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const testSubjects = getService('testSubjects');
|
||||
const supertestWithoutAuth = getService('supertestWithoutAuth');
|
||||
const reporting = getService('reporting');
|
||||
const esArchiver = getService('esArchiver');
|
||||
const security = getService('security');
|
||||
|
||||
describe('Reporting', () => {
|
||||
|
@ -33,17 +32,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
};
|
||||
|
||||
before(async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/logs');
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/logstash_functional');
|
||||
|
||||
await reporting.initLogs();
|
||||
await createReportingUser();
|
||||
await reporting.loginReportingUser();
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/logs');
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
|
||||
|
||||
await reporting.teardownLogs();
|
||||
await deleteReportingUser();
|
||||
});
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const log = getService('log');
|
||||
const testSubjects = getService('testSubjects');
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const reportingAPI = getService('reporting');
|
||||
const filterBar = getService('filterBar');
|
||||
const find = getService('find');
|
||||
const retry = getService('retry');
|
||||
|
@ -124,9 +125,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
describe('Field Formatters and Scripted Fields', () => {
|
||||
before(async () => {
|
||||
await reportingAPI.initLogs();
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/hugedata');
|
||||
});
|
||||
after(async () => {
|
||||
await reportingAPI.teardownLogs();
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/hugedata');
|
||||
});
|
||||
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -1,263 +0,0 @@
|
|||
{
|
||||
"type": "index",
|
||||
"value": {
|
||||
"aliases": {
|
||||
".kibana": {}
|
||||
},
|
||||
"index": ".kibana_1",
|
||||
"mappings": {
|
||||
"properties": {
|
||||
"config": {
|
||||
"dynamic": "true",
|
||||
"properties": {
|
||||
"buildNum": {
|
||||
"type": "keyword"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dashboard": {
|
||||
"dynamic": "strict",
|
||||
"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": {
|
||||
"dynamic": "strict",
|
||||
"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": {
|
||||
"dynamic": "strict",
|
||||
"properties": {
|
||||
"fieldFormatMap": {
|
||||
"type": "text"
|
||||
},
|
||||
"fields": {
|
||||
"type": "text"
|
||||
},
|
||||
"intervalName": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"notExpandable": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"sourceFilters": {
|
||||
"type": "text"
|
||||
},
|
||||
"timeFieldName": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"title": {
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
},
|
||||
"search": {
|
||||
"dynamic": "strict",
|
||||
"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": {
|
||||
"dynamic": "strict",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "keyword"
|
||||
}
|
||||
}
|
||||
},
|
||||
"space": {
|
||||
"properties": {
|
||||
"_reserved": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"color": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"initials": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"name": {
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"ignore_above": 2048,
|
||||
"type": "keyword"
|
||||
}
|
||||
},
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
},
|
||||
"spaceId": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"type": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"url": {
|
||||
"dynamic": "strict",
|
||||
"properties": {
|
||||
"accessCount": {
|
||||
"type": "long"
|
||||
},
|
||||
"accessDate": {
|
||||
"type": "date"
|
||||
},
|
||||
"createDate": {
|
||||
"type": "date"
|
||||
},
|
||||
"url": {
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"ignore_above": 2048,
|
||||
"type": "keyword"
|
||||
}
|
||||
},
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visualization": {
|
||||
"dynamic": "strict",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"kibanaSavedObjectMeta": {
|
||||
"properties": {
|
||||
"searchSourceJSON": {
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
},
|
||||
"savedSearchId": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"title": {
|
||||
"type": "text"
|
||||
},
|
||||
"uiStateJSON": {
|
||||
"type": "text"
|
||||
},
|
||||
"version": {
|
||||
"type": "integer"
|
||||
},
|
||||
"visState": {
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"index": {
|
||||
"number_of_replicas": "1",
|
||||
"number_of_shards": "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -1,92 +0,0 @@
|
|||
{
|
||||
"type": "index",
|
||||
"value": {
|
||||
"aliases": {
|
||||
},
|
||||
"index": "tests-001",
|
||||
"mappings": {
|
||||
"properties": {
|
||||
"@date": {
|
||||
"type": "date"
|
||||
},
|
||||
"ants": {
|
||||
"type": "integer"
|
||||
},
|
||||
"country": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"name": {
|
||||
"type": "keyword"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"index": {
|
||||
"number_of_replicas": "0",
|
||||
"number_of_shards": "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"type": "index",
|
||||
"value": {
|
||||
"aliases": {
|
||||
},
|
||||
"index": "tests-002",
|
||||
"mappings": {
|
||||
"properties": {
|
||||
"@date": {
|
||||
"type": "date"
|
||||
},
|
||||
"ants": {
|
||||
"type": "integer"
|
||||
},
|
||||
"country": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"name": {
|
||||
"type": "keyword"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"index": {
|
||||
"number_of_replicas": "0",
|
||||
"number_of_shards": "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"type": "index",
|
||||
"value": {
|
||||
"aliases": {
|
||||
},
|
||||
"index": "tests-003",
|
||||
"mappings": {
|
||||
"properties": {
|
||||
"@date": {
|
||||
"type": "date"
|
||||
},
|
||||
"ants": {
|
||||
"type": "integer"
|
||||
},
|
||||
"country": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"name": {
|
||||
"type": "keyword"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"index": {
|
||||
"number_of_replicas": "0",
|
||||
"number_of_shards": "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
25
x-pack/test/functional/es_archives/reporting/nanos/data.json
Normal file
25
x-pack/test/functional/es_archives/reporting/nanos/data.json
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"type": "doc",
|
||||
"value": {
|
||||
"id": "1",
|
||||
"index": "nanos",
|
||||
"source": {
|
||||
"date": "2015-01-01T12:10:30",
|
||||
"message": "Hello 1"
|
||||
},
|
||||
"type": "_doc"
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"type": "doc",
|
||||
"value": {
|
||||
"id": "2",
|
||||
"index": "nanos",
|
||||
"source": {
|
||||
"date": "2015-01-01T12:10:30.123456789Z",
|
||||
"message": "Hello 2"
|
||||
},
|
||||
"type": "_doc"
|
||||
}
|
||||
}
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -1,267 +1,3 @@
|
|||
{
|
||||
"type": "index",
|
||||
"value": {
|
||||
"aliases": {
|
||||
".kibana": {}
|
||||
},
|
||||
"index": ".kibana_1",
|
||||
"mappings": {
|
||||
"properties": {
|
||||
"config": {
|
||||
"dynamic": "true",
|
||||
"properties": {
|
||||
"buildNum": {
|
||||
"type": "keyword"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dashboard": {
|
||||
"dynamic": "strict",
|
||||
"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": {
|
||||
"dynamic": "strict",
|
||||
"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": {
|
||||
"dynamic": "strict",
|
||||
"properties": {
|
||||
"fieldFormatMap": {
|
||||
"type": "text"
|
||||
},
|
||||
"fields": {
|
||||
"type": "text"
|
||||
},
|
||||
"intervalName": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"notExpandable": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"sourceFilters": {
|
||||
"type": "text"
|
||||
},
|
||||
"timeFieldName": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"title": {
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
},
|
||||
"search": {
|
||||
"dynamic": "strict",
|
||||
"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": {
|
||||
"dynamic": "strict",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "keyword"
|
||||
}
|
||||
}
|
||||
},
|
||||
"space": {
|
||||
"properties": {
|
||||
"_reserved": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"color": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"initials": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"name": {
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"ignore_above": 2048,
|
||||
"type": "keyword"
|
||||
}
|
||||
},
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
},
|
||||
"spaceId": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"type": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"url": {
|
||||
"dynamic": "strict",
|
||||
"properties": {
|
||||
"accessCount": {
|
||||
"type": "long"
|
||||
},
|
||||
"accessDate": {
|
||||
"type": "date"
|
||||
},
|
||||
"createDate": {
|
||||
"type": "date"
|
||||
},
|
||||
"url": {
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"ignore_above": 2048,
|
||||
"type": "keyword"
|
||||
}
|
||||
},
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visualization": {
|
||||
"dynamic": "strict",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"kibanaSavedObjectMeta": {
|
||||
"properties": {
|
||||
"searchSourceJSON": {
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
},
|
||||
"savedSearchId": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"title": {
|
||||
"type": "text"
|
||||
},
|
||||
"uiStateJSON": {
|
||||
"type": "text"
|
||||
},
|
||||
"version": {
|
||||
"type": "integer"
|
||||
},
|
||||
"visState": {
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"index": {
|
||||
"number_of_replicas": "1",
|
||||
"number_of_shards": "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"type": "index",
|
||||
"value": {
|
||||
|
|
File diff suppressed because one or more lines are too long
441
x-pack/test/functional/fixtures/kbn_archiver/reporting/logs.json
Normal file
441
x-pack/test/functional/fixtures/kbn_archiver/reporting/logs.json
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,68 +1,5 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Reporting APIs CSV Generation from SearchSource Exports CSV with all fields when using defaults 1`] = `
|
||||
"_id,_index,_score,_type,category,category.keyword,currency,customer_first_name,customer_first_name.keyword,customer_full_name,customer_full_name.keyword,customer_gender,customer_id,customer_last_name,customer_last_name.keyword,customer_phone,day_of_week,day_of_week_i,email,geoip.city_name,geoip.continent_name,geoip.country_iso_code,geoip.location,geoip.region_name,manufacturer,manufacturer.keyword,order_date,order_id,products._id,products._id.keyword,products.base_price,products.base_unit_price,products.category,products.category.keyword,products.created_on,products.discount_amount,products.discount_percentage,products.manufacturer,products.manufacturer.keyword,products.min_price,products.price,products.product_id,products.product_name,products.product_name.keyword,products.quantity,products.sku,products.tax_amount,products.taxful_price,products.taxless_price,products.unit_discount_amount,sku,taxful_total_price,taxless_total_price,total_quantity,total_unique_products,type,user
|
||||
9AMtOW0BH63Xcmy432DJ,ecommerce,-,-,Men's Clothing,Men's Clothing,EUR,Boris,Boris,Boris Bradley,Boris Bradley,MALE,36,Bradley,Bradley,(empty),Wednesday,2,boris@bradley-family.zzz,-,Europe,GB,{
|
||||
\\"coordinates\\": [
|
||||
-0.1,
|
||||
51.5
|
||||
],
|
||||
\\"type\\": \\"Point\\"
|
||||
},-,Microlutions, Elitelligence,Microlutions, Elitelligence,Jun 25, 2019 @ 00:00:00.000,568397,sold_product_568397_24419, sold_product_568397_20207,sold_product_568397_24419, sold_product_568397_20207,33, 28.984,33, 28.984,Men's Clothing, Men's Clothing,Men's Clothing, Men's Clothing,Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,0, 0,0, 0,Microlutions, Elitelligence,Microlutions, Elitelligence,17.484, 13.922,33, 28.984,24,419, 20,207,Cargo trousers - oliv, Trousers - black,Cargo trousers - oliv, Trousers - black,1, 1,ZO0112101121, ZO0530405304,0, 0,33, 28.984,33, 28.984,0, 0,ZO0112101121, ZO0530405304,61.969,61.969,2,2,order,boris
|
||||
9QMtOW0BH63Xcmy432DJ,ecommerce,-,-,Men's Clothing,Men's Clothing,EUR,Oliver,Oliver,Oliver Hubbard,Oliver Hubbard,MALE,7,Hubbard,Hubbard,(empty),Wednesday,2,oliver@hubbard-family.zzz,-,Europe,GB,{
|
||||
\\"coordinates\\": [
|
||||
-0.1,
|
||||
51.5
|
||||
],
|
||||
\\"type\\": \\"Point\\"
|
||||
},-,Spritechnologies, Microlutions,Spritechnologies, Microlutions,Jun 25, 2019 @ 00:00:00.000,568044,sold_product_568044_12799, sold_product_568044_18008,sold_product_568044_12799, sold_product_568044_18008,14.992, 16.984,14.992, 16.984,Men's Clothing, Men's Clothing,Men's Clothing, Men's Clothing,Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,0, 0,0, 0,Spritechnologies, Microlutions,Spritechnologies, Microlutions,6.898, 8.828,14.992, 16.984,12,799, 18,008,Undershirt - dark grey multicolor, Long sleeved top - purple,Undershirt - dark grey multicolor, Long sleeved top - purple,1, 1,ZO0630406304, ZO0120201202,0, 0,14.992, 16.984,14.992, 16.984,0, 0,ZO0630406304, ZO0120201202,31.984,31.984,2,2,order,oliver
|
||||
OAMtOW0BH63Xcmy432HJ,ecommerce,-,-,Women's Accessories,Women's Accessories,EUR,Betty,Betty,Betty Reese,Betty Reese,FEMALE,44,Reese,Reese,(empty),Wednesday,2,betty@reese-family.zzz,New York,North America,US,{
|
||||
\\"coordinates\\": [
|
||||
-74,
|
||||
40.7
|
||||
],
|
||||
\\"type\\": \\"Point\\"
|
||||
},New York,Pyramidustries,Pyramidustries,Jun 25, 2019 @ 00:00:00.000,568229,sold_product_568229_24991, sold_product_568229_12039,sold_product_568229_24991, sold_product_568229_12039,11.992, 10.992,11.992, 10.992,Women's Accessories, Women's Accessories,Women's Accessories, Women's Accessories,Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,0, 0,0, 0,Pyramidustries, Pyramidustries,Pyramidustries, Pyramidustries,6.352, 5.82,11.992, 10.992,24,991, 12,039,Scarf - rose/white, Scarf - nude/black/turquoise,Scarf - rose/white, Scarf - nude/black/turquoise,1, 1,ZO0192201922, ZO0192801928,0, 0,11.992, 10.992,11.992, 10.992,0, 0,ZO0192201922, ZO0192801928,22.984,22.984,2,2,order,betty
|
||||
OQMtOW0BH63Xcmy432HJ,ecommerce,-,-,Men's Clothing, Men's Accessories,Men's Clothing, Men's Accessories,EUR,Recip,Recip,Recip Salazar,Recip Salazar,MALE,10,Salazar,Salazar,(empty),Wednesday,2,recip@salazar-family.zzz,Istanbul,Asia,TR,{
|
||||
\\"coordinates\\": [
|
||||
29,
|
||||
41
|
||||
],
|
||||
\\"type\\": \\"Point\\"
|
||||
},Istanbul,Elitelligence,Elitelligence,Jun 25, 2019 @ 00:00:00.000,568292,sold_product_568292_23627, sold_product_568292_11149,sold_product_568292_23627, sold_product_568292_11149,24.984, 10.992,24.984, 10.992,Men's Clothing, Men's Accessories,Men's Clothing, Men's Accessories,Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,0, 0,0, 0,Elitelligence, Elitelligence,Elitelligence, Elitelligence,12.492, 5.059,24.984, 10.992,23,627, 11,149,Slim fit jeans - grey, Sunglasses - black,Slim fit jeans - grey, Sunglasses - black,1, 1,ZO0534205342, ZO0599605996,0, 0,24.984, 10.992,24.984, 10.992,0, 0,ZO0534205342, ZO0599605996,35.969,35.969,2,2,order,recip
|
||||
jwMtOW0BH63Xcmy432HJ,ecommerce,-,-,Men's Clothing,Men's Clothing,EUR,Jackson,Jackson,Jackson Harper,Jackson Harper,MALE,13,Harper,Harper,(empty),Wednesday,2,jackson@harper-family.zzz,Los Angeles,North America,US,{
|
||||
\\"coordinates\\": [
|
||||
-118.2,
|
||||
34.1
|
||||
],
|
||||
\\"type\\": \\"Point\\"
|
||||
},California,Low Tide Media, Oceanavigations,Low Tide Media, Oceanavigations,Jun 25, 2019 @ 00:00:00.000,568386,sold_product_568386_11959, sold_product_568386_2774,sold_product_568386_11959, sold_product_568386_2774,24.984, 85,24.984, 85,Men's Clothing, Men's Clothing,Men's Clothing, Men's Clothing,Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,0, 0,0, 0,Low Tide Media, Oceanavigations,Low Tide Media, Oceanavigations,12.742, 45.875,24.984, 85,11,959, 2,774,SLIM FIT - Formal shirt - lila, Classic coat - black,SLIM FIT - Formal shirt - lila, Classic coat - black,1, 1,ZO0422404224, ZO0291702917,0, 0,24.984, 85,24.984, 85,0, 0,ZO0422404224, ZO0291702917,110,110,2,2,order,jackson
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Reporting APIs CSV Generation from SearchSource Exports CSV with almost all fields when using fieldsFromSource 1`] = `
|
||||
"_id,_index,_score,_type,category,currency,customer_first_name,customer_full_name,customer_gender,customer_id,customer_last_name,customer_phone,day_of_week,day_of_week_i,email,geoip,manufacturer,order_date,order_id,products,products.created_on,sku,taxful_total_price,taxless_total_price,total_quantity,total_unique_products,type,user
|
||||
9AMtOW0BH63Xcmy432DJ,ecommerce,-,-,Men's Clothing,EUR,Boris,Boris Bradley,MALE,36,Bradley,-,Wednesday,2,boris@bradley-family.zzz,{\\"continent_name\\":\\"Europe\\",\\"country_iso_code\\":\\"GB\\",\\"location\\":{\\"lat\\":51.5,\\"lon\\":-0.1}},Microlutions, Elitelligence,Jun 25, 2019 @ 00:00:00.000,568397,{\\"_id\\":\\"sold_product_568397_24419\\",\\"base_price\\":32.99,\\"base_unit_price\\":32.99,\\"category\\":\\"Men's Clothing\\",\\"created_on\\":\\"2016-12-14T00:00:00+00:00\\",\\"discount_amount\\":0,\\"discount_percentage\\":0,\\"manufacturer\\":\\"Microlutions\\",\\"min_price\\":17.48,\\"price\\":32.99,\\"product_id\\":24419,\\"product_name\\":\\"Cargo trousers - oliv\\",\\"quantity\\":1,\\"sku\\":\\"ZO0112101121\\",\\"tax_amount\\":0,\\"taxful_price\\":32.99,\\"taxless_price\\":32.99,\\"unit_discount_amount\\":0}, {\\"_id\\":\\"sold_product_568397_20207\\",\\"base_price\\":28.99,\\"base_unit_price\\":28.99,\\"category\\":\\"Men's Clothing\\",\\"created_on\\":\\"2016-12-14T00:00:00+00:00\\",\\"discount_amount\\":0,\\"discount_percentage\\":0,\\"manufacturer\\":\\"Elitelligence\\",\\"min_price\\":13.92,\\"price\\":28.99,\\"product_id\\":20207,\\"product_name\\":\\"Trousers - black\\",\\"quantity\\":1,\\"sku\\":\\"ZO0530405304\\",\\"tax_amount\\":0,\\"taxful_price\\":28.99,\\"taxless_price\\":28.99,\\"unit_discount_amount\\":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0112101121, ZO0530405304,61.98,61.98,2,2,order,boris
|
||||
9QMtOW0BH63Xcmy432DJ,ecommerce,-,-,Men's Clothing,EUR,Oliver,Oliver Hubbard,MALE,7,Hubbard,-,Wednesday,2,oliver@hubbard-family.zzz,{\\"continent_name\\":\\"Europe\\",\\"country_iso_code\\":\\"GB\\",\\"location\\":{\\"lat\\":51.5,\\"lon\\":-0.1}},Spritechnologies, Microlutions,Jun 25, 2019 @ 00:00:00.000,568044,{\\"_id\\":\\"sold_product_568044_12799\\",\\"base_price\\":14.99,\\"base_unit_price\\":14.99,\\"category\\":\\"Men's Clothing\\",\\"created_on\\":\\"2016-12-14T00:00:00+00:00\\",\\"discount_amount\\":0,\\"discount_percentage\\":0,\\"manufacturer\\":\\"Spritechnologies\\",\\"min_price\\":6.9,\\"price\\":14.99,\\"product_id\\":12799,\\"product_name\\":\\"Undershirt - dark grey multicolor\\",\\"quantity\\":1,\\"sku\\":\\"ZO0630406304\\",\\"tax_amount\\":0,\\"taxful_price\\":14.99,\\"taxless_price\\":14.99,\\"unit_discount_amount\\":0}, {\\"_id\\":\\"sold_product_568044_18008\\",\\"base_price\\":16.99,\\"base_unit_price\\":16.99,\\"category\\":\\"Men's Clothing\\",\\"created_on\\":\\"2016-12-14T00:00:00+00:00\\",\\"discount_amount\\":0,\\"discount_percentage\\":0,\\"manufacturer\\":\\"Microlutions\\",\\"min_price\\":8.83,\\"price\\":16.99,\\"product_id\\":18008,\\"product_name\\":\\"Long sleeved top - purple\\",\\"quantity\\":1,\\"sku\\":\\"ZO0120201202\\",\\"tax_amount\\":0,\\"taxful_price\\":16.99,\\"taxless_price\\":16.99,\\"unit_discount_amount\\":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0630406304, ZO0120201202,31.98,31.98,2,2,order,oliver
|
||||
OAMtOW0BH63Xcmy432HJ,ecommerce,-,-,Women's Accessories,EUR,Betty,Betty Reese,FEMALE,44,Reese,-,Wednesday,2,betty@reese-family.zzz,{\\"city_name\\":\\"New York\\",\\"continent_name\\":\\"North America\\",\\"country_iso_code\\":\\"US\\",\\"location\\":{\\"lat\\":40.7,\\"lon\\":-74},\\"region_name\\":\\"New York\\"},Pyramidustries,Jun 25, 2019 @ 00:00:00.000,568229,{\\"_id\\":\\"sold_product_568229_24991\\",\\"base_price\\":11.99,\\"base_unit_price\\":11.99,\\"category\\":\\"Women's Accessories\\",\\"created_on\\":\\"2016-12-14T00:00:00+00:00\\",\\"discount_amount\\":0,\\"discount_percentage\\":0,\\"manufacturer\\":\\"Pyramidustries\\",\\"min_price\\":6.35,\\"price\\":11.99,\\"product_id\\":24991,\\"product_name\\":\\"Scarf - rose/white\\",\\"quantity\\":1,\\"sku\\":\\"ZO0192201922\\",\\"tax_amount\\":0,\\"taxful_price\\":11.99,\\"taxless_price\\":11.99,\\"unit_discount_amount\\":0}, {\\"_id\\":\\"sold_product_568229_12039\\",\\"base_price\\":10.99,\\"base_unit_price\\":10.99,\\"category\\":\\"Women's Accessories\\",\\"created_on\\":\\"2016-12-14T00:00:00+00:00\\",\\"discount_amount\\":0,\\"discount_percentage\\":0,\\"manufacturer\\":\\"Pyramidustries\\",\\"min_price\\":5.82,\\"price\\":10.99,\\"product_id\\":12039,\\"product_name\\":\\"Scarf - nude/black/turquoise\\",\\"quantity\\":1,\\"sku\\":\\"ZO0192801928\\",\\"tax_amount\\":0,\\"taxful_price\\":10.99,\\"taxless_price\\":10.99,\\"unit_discount_amount\\":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0192201922, ZO0192801928,22.98,22.98,2,2,order,betty
|
||||
OQMtOW0BH63Xcmy432HJ,ecommerce,-,-,Men's Clothing, Men's Accessories,EUR,Recip,Recip Salazar,MALE,10,Salazar,-,Wednesday,2,recip@salazar-family.zzz,{\\"city_name\\":\\"Istanbul\\",\\"continent_name\\":\\"Asia\\",\\"country_iso_code\\":\\"TR\\",\\"location\\":{\\"lat\\":41,\\"lon\\":29},\\"region_name\\":\\"Istanbul\\"},Elitelligence,Jun 25, 2019 @ 00:00:00.000,568292,{\\"_id\\":\\"sold_product_568292_23627\\",\\"base_price\\":24.99,\\"base_unit_price\\":24.99,\\"category\\":\\"Men's Clothing\\",\\"created_on\\":\\"2016-12-14T00:00:00+00:00\\",\\"discount_amount\\":0,\\"discount_percentage\\":0,\\"manufacturer\\":\\"Elitelligence\\",\\"min_price\\":12.49,\\"price\\":24.99,\\"product_id\\":23627,\\"product_name\\":\\"Slim fit jeans - grey\\",\\"quantity\\":1,\\"sku\\":\\"ZO0534205342\\",\\"tax_amount\\":0,\\"taxful_price\\":24.99,\\"taxless_price\\":24.99,\\"unit_discount_amount\\":0}, {\\"_id\\":\\"sold_product_568292_11149\\",\\"base_price\\":10.99,\\"base_unit_price\\":10.99,\\"category\\":\\"Men's Accessories\\",\\"created_on\\":\\"2016-12-14T00:00:00+00:00\\",\\"discount_amount\\":0,\\"discount_percentage\\":0,\\"manufacturer\\":\\"Elitelligence\\",\\"min_price\\":5.06,\\"price\\":10.99,\\"product_id\\":11149,\\"product_name\\":\\"Sunglasses - black\\",\\"quantity\\":1,\\"sku\\":\\"ZO0599605996\\",\\"tax_amount\\":0,\\"taxful_price\\":10.99,\\"taxless_price\\":10.99,\\"unit_discount_amount\\":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0534205342, ZO0599605996,35.98,35.98,2,2,order,recip
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Reporting APIs CSV Generation from SearchSource date formatting Formatted date_nanos data, UTC timezone 1`] = `
|
||||
"date,message
|
||||
\\"Jan 1, 2015 @ 12:10:30.123456789\\",\\"Hello 2\\"
|
||||
\\"Jan 1, 2015 @ 12:10:30.000000000\\",\\"Hello 1\\"
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Reporting APIs CSV Generation from SearchSource date formatting Formatted date_nanos data, custom timezone (New York) 1`] = `
|
||||
"date,message
|
||||
\\"Jan 1, 2015 @ 07:10:30.123456789\\",\\"Hello 2\\"
|
||||
\\"Jan 1, 2015 @ 07:10:30.000000000\\",\\"Hello 1\\"
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Reporting APIs CSV Generation from SearchSource date formatting With filters and timebased data, default to UTC 1`] = `
|
||||
"\\"@timestamp\\",clientip,extension
|
||||
\\"Sep 20, 2015 @ 10:26:48.725\\",\\"74.214.76.90\\",jpg
|
||||
|
@ -191,6 +128,20 @@ exports[`Reporting APIs CSV Generation from SearchSource date formatting With fi
|
|||
"
|
||||
`;
|
||||
|
||||
exports[`Reporting APIs CSV Generation from SearchSource nanosecond formatting Formatted date_nanos data, UTC timezone 1`] = `
|
||||
"date,message
|
||||
\\"Jan 1, 2015 @ 12:10:30.123456789\\",\\"Hello 2\\"
|
||||
\\"Jan 1, 2015 @ 12:10:30.000000000\\",\\"Hello 1\\"
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Reporting APIs CSV Generation from SearchSource nanosecond formatting Formatted date_nanos data, custom timezone (New York) 1`] = `
|
||||
"date,message
|
||||
\\"Jan 1, 2015 @ 07:10:30.123456789\\",\\"Hello 2\\"
|
||||
\\"Jan 1, 2015 @ 07:10:30.000000000\\",\\"Hello 1\\"
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Reporting APIs CSV Generation from SearchSource non-timebased Handle _id and _index columns 1`] = `
|
||||
"date,message,\\"_id\\",\\"_index\\"
|
||||
\\"Jan 1, 2015 @ 12:10:30.123456789\\",\\"Hello 2\\",2,nanos
|
||||
|
@ -215,6 +166,55 @@ exports[`Reporting APIs CSV Generation from SearchSource non-timebased With filt
|
|||
"
|
||||
`;
|
||||
|
||||
exports[`Reporting APIs CSV Generation from SearchSource unquoted values Exports CSV with all fields when using defaults 1`] = `
|
||||
"_id,_index,_score,_type,category,category.keyword,currency,customer_first_name,customer_first_name.keyword,customer_full_name,customer_full_name.keyword,customer_gender,customer_id,customer_last_name,customer_last_name.keyword,customer_phone,day_of_week,day_of_week_i,email,geoip.city_name,geoip.continent_name,geoip.country_iso_code,geoip.location,geoip.region_name,manufacturer,manufacturer.keyword,order_date,order_id,products._id,products._id.keyword,products.base_price,products.base_unit_price,products.category,products.category.keyword,products.created_on,products.discount_amount,products.discount_percentage,products.manufacturer,products.manufacturer.keyword,products.min_price,products.price,products.product_id,products.product_name,products.product_name.keyword,products.quantity,products.sku,products.tax_amount,products.taxful_price,products.taxless_price,products.unit_discount_amount,sku,taxful_total_price,taxless_total_price,total_quantity,total_unique_products,type,user
|
||||
9AMtOW0BH63Xcmy432DJ,ecommerce,-,-,Men's Clothing,Men's Clothing,EUR,Boris,Boris,Boris Bradley,Boris Bradley,MALE,36,Bradley,Bradley,(empty),Wednesday,2,boris@bradley-family.zzz,-,Europe,GB,{
|
||||
\\"coordinates\\": [
|
||||
-0.1,
|
||||
51.5
|
||||
],
|
||||
\\"type\\": \\"Point\\"
|
||||
},-,Microlutions, Elitelligence,Microlutions, Elitelligence,Jun 25, 2019 @ 00:00:00.000,568397,sold_product_568397_24419, sold_product_568397_20207,sold_product_568397_24419, sold_product_568397_20207,33, 28.984,33, 28.984,Men's Clothing, Men's Clothing,Men's Clothing, Men's Clothing,Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,0, 0,0, 0,Microlutions, Elitelligence,Microlutions, Elitelligence,17.484, 13.922,33, 28.984,24,419, 20,207,Cargo trousers - oliv, Trousers - black,Cargo trousers - oliv, Trousers - black,1, 1,ZO0112101121, ZO0530405304,0, 0,33, 28.984,33, 28.984,0, 0,ZO0112101121, ZO0530405304,61.969,61.969,2,2,order,boris
|
||||
9QMtOW0BH63Xcmy432DJ,ecommerce,-,-,Men's Clothing,Men's Clothing,EUR,Oliver,Oliver,Oliver Hubbard,Oliver Hubbard,MALE,7,Hubbard,Hubbard,(empty),Wednesday,2,oliver@hubbard-family.zzz,-,Europe,GB,{
|
||||
\\"coordinates\\": [
|
||||
-0.1,
|
||||
51.5
|
||||
],
|
||||
\\"type\\": \\"Point\\"
|
||||
},-,Spritechnologies, Microlutions,Spritechnologies, Microlutions,Jun 25, 2019 @ 00:00:00.000,568044,sold_product_568044_12799, sold_product_568044_18008,sold_product_568044_12799, sold_product_568044_18008,14.992, 16.984,14.992, 16.984,Men's Clothing, Men's Clothing,Men's Clothing, Men's Clothing,Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,0, 0,0, 0,Spritechnologies, Microlutions,Spritechnologies, Microlutions,6.898, 8.828,14.992, 16.984,12,799, 18,008,Undershirt - dark grey multicolor, Long sleeved top - purple,Undershirt - dark grey multicolor, Long sleeved top - purple,1, 1,ZO0630406304, ZO0120201202,0, 0,14.992, 16.984,14.992, 16.984,0, 0,ZO0630406304, ZO0120201202,31.984,31.984,2,2,order,oliver
|
||||
OAMtOW0BH63Xcmy432HJ,ecommerce,-,-,Women's Accessories,Women's Accessories,EUR,Betty,Betty,Betty Reese,Betty Reese,FEMALE,44,Reese,Reese,(empty),Wednesday,2,betty@reese-family.zzz,New York,North America,US,{
|
||||
\\"coordinates\\": [
|
||||
-74,
|
||||
40.7
|
||||
],
|
||||
\\"type\\": \\"Point\\"
|
||||
},New York,Pyramidustries,Pyramidustries,Jun 25, 2019 @ 00:00:00.000,568229,sold_product_568229_24991, sold_product_568229_12039,sold_product_568229_24991, sold_product_568229_12039,11.992, 10.992,11.992, 10.992,Women's Accessories, Women's Accessories,Women's Accessories, Women's Accessories,Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,0, 0,0, 0,Pyramidustries, Pyramidustries,Pyramidustries, Pyramidustries,6.352, 5.82,11.992, 10.992,24,991, 12,039,Scarf - rose/white, Scarf - nude/black/turquoise,Scarf - rose/white, Scarf - nude/black/turquoise,1, 1,ZO0192201922, ZO0192801928,0, 0,11.992, 10.992,11.992, 10.992,0, 0,ZO0192201922, ZO0192801928,22.984,22.984,2,2,order,betty
|
||||
OQMtOW0BH63Xcmy432HJ,ecommerce,-,-,Men's Clothing, Men's Accessories,Men's Clothing, Men's Accessories,EUR,Recip,Recip,Recip Salazar,Recip Salazar,MALE,10,Salazar,Salazar,(empty),Wednesday,2,recip@salazar-family.zzz,Istanbul,Asia,TR,{
|
||||
\\"coordinates\\": [
|
||||
29,
|
||||
41
|
||||
],
|
||||
\\"type\\": \\"Point\\"
|
||||
},Istanbul,Elitelligence,Elitelligence,Jun 25, 2019 @ 00:00:00.000,568292,sold_product_568292_23627, sold_product_568292_11149,sold_product_568292_23627, sold_product_568292_11149,24.984, 10.992,24.984, 10.992,Men's Clothing, Men's Accessories,Men's Clothing, Men's Accessories,Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,0, 0,0, 0,Elitelligence, Elitelligence,Elitelligence, Elitelligence,12.492, 5.059,24.984, 10.992,23,627, 11,149,Slim fit jeans - grey, Sunglasses - black,Slim fit jeans - grey, Sunglasses - black,1, 1,ZO0534205342, ZO0599605996,0, 0,24.984, 10.992,24.984, 10.992,0, 0,ZO0534205342, ZO0599605996,35.969,35.969,2,2,order,recip
|
||||
jwMtOW0BH63Xcmy432HJ,ecommerce,-,-,Men's Clothing,Men's Clothing,EUR,Jackson,Jackson,Jackson Harper,Jackson Harper,MALE,13,Harper,Harper,(empty),Wednesday,2,jackson@harper-family.zzz,Los Angeles,North America,US,{
|
||||
\\"coordinates\\": [
|
||||
-118.2,
|
||||
34.1
|
||||
],
|
||||
\\"type\\": \\"Point\\"
|
||||
},California,Low Tide Media, Oceanavigations,Low Tide Media, Oceanavigations,Jun 25, 2019 @ 00:00:00.000,568386,sold_product_568386_11959, sold_product_568386_2774,sold_product_568386_11959, sold_product_568386_2774,24.984, 85,24.984, 85,Men's Clothing, Men's Clothing,Men's Clothing, Men's Clothing,Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,0, 0,0, 0,Low Tide Media, Oceanavigations,Low Tide Media, Oceanavigations,12.742, 45.875,24.984, 85,11,959, 2,774,SLIM FIT - Formal shirt - lila, Classic coat - black,SLIM FIT - Formal shirt - lila, Classic coat - black,1, 1,ZO0422404224, ZO0291702917,0, 0,24.984, 85,24.984, 85,0, 0,ZO0422404224, ZO0291702917,110,110,2,2,order,jackson
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Reporting APIs CSV Generation from SearchSource unquoted values Exports CSV with almost all fields when using fieldsFromSource 1`] = `
|
||||
"_id,_index,_score,_type,category,currency,customer_first_name,customer_full_name,customer_gender,customer_id,customer_last_name,customer_phone,day_of_week,day_of_week_i,email,geoip,manufacturer,order_date,order_id,products,products.created_on,sku,taxful_total_price,taxless_total_price,total_quantity,total_unique_products,type,user
|
||||
9AMtOW0BH63Xcmy432DJ,ecommerce,-,-,Men's Clothing,EUR,Boris,Boris Bradley,MALE,36,Bradley,-,Wednesday,2,boris@bradley-family.zzz,{\\"continent_name\\":\\"Europe\\",\\"country_iso_code\\":\\"GB\\",\\"location\\":{\\"lat\\":51.5,\\"lon\\":-0.1}},Microlutions, Elitelligence,Jun 25, 2019 @ 00:00:00.000,568397,{\\"_id\\":\\"sold_product_568397_24419\\",\\"base_price\\":32.99,\\"base_unit_price\\":32.99,\\"category\\":\\"Men's Clothing\\",\\"created_on\\":\\"2016-12-14T00:00:00+00:00\\",\\"discount_amount\\":0,\\"discount_percentage\\":0,\\"manufacturer\\":\\"Microlutions\\",\\"min_price\\":17.48,\\"price\\":32.99,\\"product_id\\":24419,\\"product_name\\":\\"Cargo trousers - oliv\\",\\"quantity\\":1,\\"sku\\":\\"ZO0112101121\\",\\"tax_amount\\":0,\\"taxful_price\\":32.99,\\"taxless_price\\":32.99,\\"unit_discount_amount\\":0}, {\\"_id\\":\\"sold_product_568397_20207\\",\\"base_price\\":28.99,\\"base_unit_price\\":28.99,\\"category\\":\\"Men's Clothing\\",\\"created_on\\":\\"2016-12-14T00:00:00+00:00\\",\\"discount_amount\\":0,\\"discount_percentage\\":0,\\"manufacturer\\":\\"Elitelligence\\",\\"min_price\\":13.92,\\"price\\":28.99,\\"product_id\\":20207,\\"product_name\\":\\"Trousers - black\\",\\"quantity\\":1,\\"sku\\":\\"ZO0530405304\\",\\"tax_amount\\":0,\\"taxful_price\\":28.99,\\"taxless_price\\":28.99,\\"unit_discount_amount\\":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0112101121, ZO0530405304,61.98,61.98,2,2,order,boris
|
||||
9QMtOW0BH63Xcmy432DJ,ecommerce,-,-,Men's Clothing,EUR,Oliver,Oliver Hubbard,MALE,7,Hubbard,-,Wednesday,2,oliver@hubbard-family.zzz,{\\"continent_name\\":\\"Europe\\",\\"country_iso_code\\":\\"GB\\",\\"location\\":{\\"lat\\":51.5,\\"lon\\":-0.1}},Spritechnologies, Microlutions,Jun 25, 2019 @ 00:00:00.000,568044,{\\"_id\\":\\"sold_product_568044_12799\\",\\"base_price\\":14.99,\\"base_unit_price\\":14.99,\\"category\\":\\"Men's Clothing\\",\\"created_on\\":\\"2016-12-14T00:00:00+00:00\\",\\"discount_amount\\":0,\\"discount_percentage\\":0,\\"manufacturer\\":\\"Spritechnologies\\",\\"min_price\\":6.9,\\"price\\":14.99,\\"product_id\\":12799,\\"product_name\\":\\"Undershirt - dark grey multicolor\\",\\"quantity\\":1,\\"sku\\":\\"ZO0630406304\\",\\"tax_amount\\":0,\\"taxful_price\\":14.99,\\"taxless_price\\":14.99,\\"unit_discount_amount\\":0}, {\\"_id\\":\\"sold_product_568044_18008\\",\\"base_price\\":16.99,\\"base_unit_price\\":16.99,\\"category\\":\\"Men's Clothing\\",\\"created_on\\":\\"2016-12-14T00:00:00+00:00\\",\\"discount_amount\\":0,\\"discount_percentage\\":0,\\"manufacturer\\":\\"Microlutions\\",\\"min_price\\":8.83,\\"price\\":16.99,\\"product_id\\":18008,\\"product_name\\":\\"Long sleeved top - purple\\",\\"quantity\\":1,\\"sku\\":\\"ZO0120201202\\",\\"tax_amount\\":0,\\"taxful_price\\":16.99,\\"taxless_price\\":16.99,\\"unit_discount_amount\\":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0630406304, ZO0120201202,31.98,31.98,2,2,order,oliver
|
||||
OAMtOW0BH63Xcmy432HJ,ecommerce,-,-,Women's Accessories,EUR,Betty,Betty Reese,FEMALE,44,Reese,-,Wednesday,2,betty@reese-family.zzz,{\\"city_name\\":\\"New York\\",\\"continent_name\\":\\"North America\\",\\"country_iso_code\\":\\"US\\",\\"location\\":{\\"lat\\":40.7,\\"lon\\":-74},\\"region_name\\":\\"New York\\"},Pyramidustries,Jun 25, 2019 @ 00:00:00.000,568229,{\\"_id\\":\\"sold_product_568229_24991\\",\\"base_price\\":11.99,\\"base_unit_price\\":11.99,\\"category\\":\\"Women's Accessories\\",\\"created_on\\":\\"2016-12-14T00:00:00+00:00\\",\\"discount_amount\\":0,\\"discount_percentage\\":0,\\"manufacturer\\":\\"Pyramidustries\\",\\"min_price\\":6.35,\\"price\\":11.99,\\"product_id\\":24991,\\"product_name\\":\\"Scarf - rose/white\\",\\"quantity\\":1,\\"sku\\":\\"ZO0192201922\\",\\"tax_amount\\":0,\\"taxful_price\\":11.99,\\"taxless_price\\":11.99,\\"unit_discount_amount\\":0}, {\\"_id\\":\\"sold_product_568229_12039\\",\\"base_price\\":10.99,\\"base_unit_price\\":10.99,\\"category\\":\\"Women's Accessories\\",\\"created_on\\":\\"2016-12-14T00:00:00+00:00\\",\\"discount_amount\\":0,\\"discount_percentage\\":0,\\"manufacturer\\":\\"Pyramidustries\\",\\"min_price\\":5.82,\\"price\\":10.99,\\"product_id\\":12039,\\"product_name\\":\\"Scarf - nude/black/turquoise\\",\\"quantity\\":1,\\"sku\\":\\"ZO0192801928\\",\\"tax_amount\\":0,\\"taxful_price\\":10.99,\\"taxless_price\\":10.99,\\"unit_discount_amount\\":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0192201922, ZO0192801928,22.98,22.98,2,2,order,betty
|
||||
OQMtOW0BH63Xcmy432HJ,ecommerce,-,-,Men's Clothing, Men's Accessories,EUR,Recip,Recip Salazar,MALE,10,Salazar,-,Wednesday,2,recip@salazar-family.zzz,{\\"city_name\\":\\"Istanbul\\",\\"continent_name\\":\\"Asia\\",\\"country_iso_code\\":\\"TR\\",\\"location\\":{\\"lat\\":41,\\"lon\\":29},\\"region_name\\":\\"Istanbul\\"},Elitelligence,Jun 25, 2019 @ 00:00:00.000,568292,{\\"_id\\":\\"sold_product_568292_23627\\",\\"base_price\\":24.99,\\"base_unit_price\\":24.99,\\"category\\":\\"Men's Clothing\\",\\"created_on\\":\\"2016-12-14T00:00:00+00:00\\",\\"discount_amount\\":0,\\"discount_percentage\\":0,\\"manufacturer\\":\\"Elitelligence\\",\\"min_price\\":12.49,\\"price\\":24.99,\\"product_id\\":23627,\\"product_name\\":\\"Slim fit jeans - grey\\",\\"quantity\\":1,\\"sku\\":\\"ZO0534205342\\",\\"tax_amount\\":0,\\"taxful_price\\":24.99,\\"taxless_price\\":24.99,\\"unit_discount_amount\\":0}, {\\"_id\\":\\"sold_product_568292_11149\\",\\"base_price\\":10.99,\\"base_unit_price\\":10.99,\\"category\\":\\"Men's Accessories\\",\\"created_on\\":\\"2016-12-14T00:00:00+00:00\\",\\"discount_amount\\":0,\\"discount_percentage\\":0,\\"manufacturer\\":\\"Elitelligence\\",\\"min_price\\":5.06,\\"price\\":10.99,\\"product_id\\":11149,\\"product_name\\":\\"Sunglasses - black\\",\\"quantity\\":1,\\"sku\\":\\"ZO0599605996\\",\\"tax_amount\\":0,\\"taxful_price\\":10.99,\\"taxless_price\\":10.99,\\"unit_discount_amount\\":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0534205342, ZO0599605996,35.98,35.98,2,2,order,recip
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Reporting APIs CSV Generation from SearchSource validation Searches large amount of data, stops at Max Size Reached 1`] = `
|
||||
"\\"_id\\",\\"_index\\",\\"_score\\",\\"_type\\",category,\\"category.keyword\\",currency,\\"customer_first_name\\",\\"customer_first_name.keyword\\",\\"customer_full_name\\",\\"customer_full_name.keyword\\",\\"customer_gender\\",\\"customer_id\\",\\"customer_last_name\\",\\"customer_last_name.keyword\\",\\"customer_phone\\",\\"day_of_week\\",\\"day_of_week_i\\",email,\\"geoip.city_name\\",\\"geoip.continent_name\\",\\"geoip.country_iso_code\\",\\"geoip.location\\",\\"geoip.region_name\\",manufacturer,\\"manufacturer.keyword\\",\\"order_date\\",\\"order_id\\",\\"products._id\\",\\"products._id.keyword\\",\\"products.base_price\\",\\"products.base_unit_price\\",\\"products.category\\",\\"products.category.keyword\\",\\"products.created_on\\",\\"products.discount_amount\\",\\"products.discount_percentage\\",\\"products.manufacturer\\",\\"products.manufacturer.keyword\\",\\"products.min_price\\",\\"products.price\\",\\"products.product_id\\",\\"products.product_name\\",\\"products.product_name.keyword\\",\\"products.quantity\\",\\"products.sku\\",\\"products.tax_amount\\",\\"products.taxful_price\\",\\"products.taxless_price\\",\\"products.unit_discount_amount\\",sku,\\"taxful_total_price\\",\\"taxless_total_price\\",\\"total_quantity\\",\\"total_unique_products\\",type,user
|
||||
3AMtOW0BH63Xcmy432DJ,ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",EUR,\\"Sultan Al\\",\\"Sultan Al\\",\\"Sultan Al Boone\\",\\"Sultan Al Boone\\",MALE,19,Boone,Boone,\\"(empty)\\",Saturday,5,\\"sultan al@boone-family.zzz\\",\\"Abu Dhabi\\",Asia,AE,\\"{
|
||||
|
|
|
@ -38,171 +38,173 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
describe('CSV Generation from SearchSource', () => {
|
||||
before(async () => {
|
||||
await kibanaServer.uiSettings.update({
|
||||
'csv:quoteValues': false,
|
||||
'dateFormat:tz': 'UTC',
|
||||
defaultIndex: 'logstash-*',
|
||||
});
|
||||
await reportingAPI.initEcommerce();
|
||||
await reportingAPI.initLogs();
|
||||
await kibanaServer.uiSettings.update({
|
||||
'csv:quoteValues': true,
|
||||
'dateFormat:tz': 'UTC',
|
||||
});
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await reportingAPI.teardownEcommerce();
|
||||
await reportingAPI.teardownLogs();
|
||||
await reportingAPI.deleteAllReports();
|
||||
});
|
||||
|
||||
it('Exports CSV with almost all fields when using fieldsFromSource', async () => {
|
||||
const {
|
||||
status: resStatus,
|
||||
text: resText,
|
||||
type: resType,
|
||||
} = (await generateAPI.getCSVFromSearchSource(
|
||||
getMockJobParams({
|
||||
searchSource: {
|
||||
query: { query: '', language: 'kuery' },
|
||||
index: '5193f870-d861-11e9-a311-0fa548c5f953',
|
||||
sort: [{ order_date: 'desc' }],
|
||||
fieldsFromSource: [
|
||||
'_id',
|
||||
'_index',
|
||||
'_score',
|
||||
'_source',
|
||||
'_type',
|
||||
'category',
|
||||
'category.keyword',
|
||||
'currency',
|
||||
'customer_birth_date',
|
||||
'customer_first_name',
|
||||
'customer_first_name.keyword',
|
||||
'customer_full_name',
|
||||
'customer_full_name.keyword',
|
||||
'customer_gender',
|
||||
'customer_id',
|
||||
'customer_last_name',
|
||||
'customer_last_name.keyword',
|
||||
'customer_phone',
|
||||
'day_of_week',
|
||||
'day_of_week_i',
|
||||
'email',
|
||||
'geoip.city_name',
|
||||
'geoip.continent_name',
|
||||
'geoip.country_iso_code',
|
||||
'geoip.location',
|
||||
'geoip.region_name',
|
||||
'manufacturer',
|
||||
'manufacturer.keyword',
|
||||
'order_date',
|
||||
'order_id',
|
||||
'products._id',
|
||||
'products._id.keyword',
|
||||
'products.base_price',
|
||||
'products.base_unit_price',
|
||||
'products.category',
|
||||
'products.category.keyword',
|
||||
'products.created_on',
|
||||
'products.discount_amount',
|
||||
'products.discount_percentage',
|
||||
'products.manufacturer',
|
||||
'products.manufacturer.keyword',
|
||||
'products.min_price',
|
||||
'products.price',
|
||||
'products.product_id',
|
||||
'products.product_name',
|
||||
'products.product_name.keyword',
|
||||
'products.quantity',
|
||||
'products.sku',
|
||||
'products.tax_amount',
|
||||
'products.taxful_price',
|
||||
'products.taxless_price',
|
||||
'products.unit_discount_amount',
|
||||
'sku',
|
||||
'taxful_total_price',
|
||||
'taxless_total_price',
|
||||
'total_quantity',
|
||||
'total_unique_products',
|
||||
'type',
|
||||
'user',
|
||||
],
|
||||
filter: [],
|
||||
parent: {
|
||||
query: { language: 'kuery', query: '' },
|
||||
filter: [],
|
||||
parent: {
|
||||
filter: [
|
||||
{
|
||||
meta: { index: '5193f870-d861-11e9-a311-0fa548c5f953', params: {} },
|
||||
range: {
|
||||
order_date: {
|
||||
gte: fromTime,
|
||||
lte: toTime,
|
||||
format: 'strict_date_optional_time',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
browserTimezone: 'UTC',
|
||||
title: 'testfooyu78yt90-',
|
||||
})
|
||||
)) as supertest.Response;
|
||||
expect(resStatus).to.eql(200);
|
||||
expect(resType).to.eql('text/csv');
|
||||
expectSnapshot(resText).toMatch();
|
||||
});
|
||||
describe('unquoted values', () => {
|
||||
before(async () => {
|
||||
await kibanaServer.uiSettings.update({ 'csv:quoteValues': false });
|
||||
});
|
||||
|
||||
it('Exports CSV with all fields when using defaults', async () => {
|
||||
const {
|
||||
status: resStatus,
|
||||
text: resText,
|
||||
type: resType,
|
||||
} = await generateAPI.getCSVFromSearchSource(
|
||||
getMockJobParams({
|
||||
searchSource: {
|
||||
query: { query: '', language: 'kuery' },
|
||||
index: '5193f870-d861-11e9-a311-0fa548c5f953',
|
||||
sort: [{ order_date: 'desc' }],
|
||||
fields: ['*'],
|
||||
filter: [],
|
||||
parent: {
|
||||
query: { language: 'kuery', query: '' },
|
||||
after(async () => {
|
||||
await kibanaServer.uiSettings.update({ 'csv:quoteValues': true });
|
||||
});
|
||||
|
||||
it('Exports CSV with almost all fields when using fieldsFromSource', async () => {
|
||||
const {
|
||||
status: resStatus,
|
||||
text: resText,
|
||||
type: resType,
|
||||
} = (await generateAPI.getCSVFromSearchSource(
|
||||
getMockJobParams({
|
||||
searchSource: {
|
||||
query: { query: '', language: 'kuery' },
|
||||
index: '5193f870-d861-11e9-a311-0fa548c5f953',
|
||||
sort: [{ order_date: 'desc' }],
|
||||
fieldsFromSource: [
|
||||
'_id',
|
||||
'_index',
|
||||
'_score',
|
||||
'_source',
|
||||
'_type',
|
||||
'category',
|
||||
'category.keyword',
|
||||
'currency',
|
||||
'customer_birth_date',
|
||||
'customer_first_name',
|
||||
'customer_first_name.keyword',
|
||||
'customer_full_name',
|
||||
'customer_full_name.keyword',
|
||||
'customer_gender',
|
||||
'customer_id',
|
||||
'customer_last_name',
|
||||
'customer_last_name.keyword',
|
||||
'customer_phone',
|
||||
'day_of_week',
|
||||
'day_of_week_i',
|
||||
'email',
|
||||
'geoip.city_name',
|
||||
'geoip.continent_name',
|
||||
'geoip.country_iso_code',
|
||||
'geoip.location',
|
||||
'geoip.region_name',
|
||||
'manufacturer',
|
||||
'manufacturer.keyword',
|
||||
'order_date',
|
||||
'order_id',
|
||||
'products._id',
|
||||
'products._id.keyword',
|
||||
'products.base_price',
|
||||
'products.base_unit_price',
|
||||
'products.category',
|
||||
'products.category.keyword',
|
||||
'products.created_on',
|
||||
'products.discount_amount',
|
||||
'products.discount_percentage',
|
||||
'products.manufacturer',
|
||||
'products.manufacturer.keyword',
|
||||
'products.min_price',
|
||||
'products.price',
|
||||
'products.product_id',
|
||||
'products.product_name',
|
||||
'products.product_name.keyword',
|
||||
'products.quantity',
|
||||
'products.sku',
|
||||
'products.tax_amount',
|
||||
'products.taxful_price',
|
||||
'products.taxless_price',
|
||||
'products.unit_discount_amount',
|
||||
'sku',
|
||||
'taxful_total_price',
|
||||
'taxless_total_price',
|
||||
'total_quantity',
|
||||
'total_unique_products',
|
||||
'type',
|
||||
'user',
|
||||
],
|
||||
filter: [],
|
||||
parent: {
|
||||
filter: [
|
||||
{
|
||||
meta: { index: '5193f870-d861-11e9-a311-0fa548c5f953', params: {} },
|
||||
range: {
|
||||
order_date: {
|
||||
gte: fromTime,
|
||||
lte: toTime,
|
||||
format: 'strict_date_optional_time',
|
||||
query: { language: 'kuery', query: '' },
|
||||
filter: [],
|
||||
parent: {
|
||||
filter: [
|
||||
{
|
||||
meta: { index: '5193f870-d861-11e9-a311-0fa548c5f953', params: {} },
|
||||
range: {
|
||||
order_date: {
|
||||
gte: fromTime,
|
||||
lte: toTime,
|
||||
format: 'strict_date_optional_time',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
browserTimezone: 'UTC',
|
||||
title: 'testfooyu78yt90-',
|
||||
})
|
||||
);
|
||||
expect(resStatus).to.eql(200);
|
||||
expect(resType).to.eql('text/csv');
|
||||
expectSnapshot(resText).toMatch();
|
||||
browserTimezone: 'UTC',
|
||||
title: 'testfooyu78yt90-',
|
||||
})
|
||||
)) as supertest.Response;
|
||||
expect(resStatus).to.eql(200);
|
||||
expect(resType).to.eql('text/csv');
|
||||
expectSnapshot(resText).toMatch();
|
||||
});
|
||||
|
||||
it('Exports CSV with all fields when using defaults', async () => {
|
||||
const {
|
||||
status: resStatus,
|
||||
text: resText,
|
||||
type: resType,
|
||||
} = await generateAPI.getCSVFromSearchSource(
|
||||
getMockJobParams({
|
||||
searchSource: {
|
||||
query: { query: '', language: 'kuery' },
|
||||
index: '5193f870-d861-11e9-a311-0fa548c5f953',
|
||||
sort: [{ order_date: 'desc' }],
|
||||
fields: ['*'],
|
||||
filter: [],
|
||||
parent: {
|
||||
query: { language: 'kuery', query: '' },
|
||||
filter: [],
|
||||
parent: {
|
||||
filter: [
|
||||
{
|
||||
meta: { index: '5193f870-d861-11e9-a311-0fa548c5f953', params: {} },
|
||||
range: {
|
||||
order_date: {
|
||||
gte: fromTime,
|
||||
lte: toTime,
|
||||
format: 'strict_date_optional_time',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
browserTimezone: 'UTC',
|
||||
title: 'testfooyu78yt90-',
|
||||
})
|
||||
);
|
||||
expect(resStatus).to.eql(200);
|
||||
expect(resType).to.eql('text/csv');
|
||||
expectSnapshot(resText).toMatch();
|
||||
});
|
||||
});
|
||||
|
||||
describe('date formatting', () => {
|
||||
before(async () => {
|
||||
// load test data that contains a saved search and documents
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/logs');
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/logstash_functional');
|
||||
});
|
||||
after(async () => {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/logs');
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
|
||||
});
|
||||
|
||||
it('With filters and timebased data, default to UTC', async () => {
|
||||
const res = (await generateAPI.getCSVFromSearchSource(
|
||||
getMockJobParams({
|
||||
|
@ -277,10 +279,18 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
expect(resType).to.eql('text/csv');
|
||||
expectSnapshot(resText).toMatch();
|
||||
});
|
||||
});
|
||||
|
||||
describe('nanosecond formatting', () => {
|
||||
before(async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/nanos');
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/nanos');
|
||||
});
|
||||
|
||||
it('Formatted date_nanos data, UTC timezone', async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/nanos');
|
||||
|
||||
const res = await generateAPI.getCSVFromSearchSource(
|
||||
getMockJobParams({
|
||||
searchSource: {
|
||||
|
@ -298,13 +308,9 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
expect(resStatus).to.eql(200);
|
||||
expect(resType).to.eql('text/csv');
|
||||
expectSnapshot(resText).toMatch();
|
||||
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/nanos');
|
||||
});
|
||||
|
||||
it('Formatted date_nanos data, custom timezone (New York)', async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/nanos');
|
||||
|
||||
const res = await generateAPI.getCSVFromSearchSource(
|
||||
getMockJobParams({
|
||||
browserTimezone: 'America/New_York',
|
||||
|
@ -323,8 +329,6 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
expect(resStatus).to.eql(200);
|
||||
expect(resType).to.eql('text/csv');
|
||||
expectSnapshot(resText).toMatch();
|
||||
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/nanos');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -354,7 +358,6 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('With filters and non-timebased data', async () => {
|
||||
// load test data that contains a saved search and documents
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/sales');
|
||||
|
||||
const {
|
||||
|
@ -405,8 +408,6 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
// NOTE: this test requires having the test server run with `xpack.reporting.csv.maxSizeBytes=6000`
|
||||
it(`Searches large amount of data, stops at Max Size Reached`, async () => {
|
||||
await reportingAPI.initEcommerce();
|
||||
|
||||
const {
|
||||
status: resStatus,
|
||||
text: resText,
|
||||
|
@ -447,8 +448,6 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
expect(resStatus).to.eql(200);
|
||||
expect(resType).to.eql('text/csv');
|
||||
expectSnapshot(resText).toMatch();
|
||||
|
||||
await reportingAPI.teardownEcommerce();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -12,7 +12,6 @@ import { JOB_PARAMS_RISON_CSV_DEPRECATED } from '../services/fixtures';
|
|||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default function ({ getService }: FtrProviderContext) {
|
||||
const esArchiver = getService('esArchiver');
|
||||
const supertestSvc = getService('supertest');
|
||||
const reportingAPI = getService('reportingAPI');
|
||||
|
||||
|
@ -32,13 +31,11 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
describe('Generation from Legacy Job Params', () => {
|
||||
before(async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/logs');
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/logstash_functional');
|
||||
await reportingAPI.initLogs();
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/logs');
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
|
||||
await reportingAPI.teardownLogs();
|
||||
await reportingAPI.deleteAllReports();
|
||||
});
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ import { ILM_POLICY_NAME } from '../../../plugins/reporting/common/constants';
|
|||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default function ({ getService }: FtrProviderContext) {
|
||||
const esArchiver = getService('esArchiver');
|
||||
const es = getService('es');
|
||||
const supertest = getService('supertest');
|
||||
const supertestWithoutAuth = getService('supertestWithoutAuth');
|
||||
|
@ -22,14 +21,12 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
describe('ILM policy migration APIs', () => {
|
||||
before(async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/logs');
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/logstash_functional');
|
||||
await reportingAPI.initLogs();
|
||||
await reportingAPI.migrateReportingIndices(); // ensure that the ILM policy exists for the first test
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/logs');
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
|
||||
await reportingAPI.teardownLogs();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
|
|
|
@ -10,11 +10,9 @@ import { FtrProviderContext } from '../ftr_provider_context';
|
|||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default function ({ getService }: FtrProviderContext) {
|
||||
const esArchiver = getService('esArchiver');
|
||||
const reportingAPI = getService('reportingAPI');
|
||||
const retry = getService('retry');
|
||||
const supertest = getService('supertest');
|
||||
const archive = 'x-pack/test/functional/es_archives/reporting/canvas_disallowed_url';
|
||||
|
||||
/*
|
||||
* The Reporting API Functional Test config implements a network policy that
|
||||
|
@ -22,11 +20,11 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
*/
|
||||
describe('Network Policy', () => {
|
||||
before(async () => {
|
||||
await esArchiver.load(archive); // includes a canvas worksheet with an offending image URL
|
||||
await reportingAPI.initLogs(); // includes a canvas worksheet with an offending image URL
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await esArchiver.unload(archive);
|
||||
await reportingAPI.teardownLogs();
|
||||
});
|
||||
|
||||
it('should fail job when page voilates the network policy', async () => {
|
||||
|
|
|
@ -38,18 +38,19 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
);
|
||||
};
|
||||
|
||||
const spacesSharedObjectsArchive =
|
||||
'x-pack/test/functional/es_archives/reporting/ecommerce_kibana_spaces';
|
||||
|
||||
describe('Exports and Spaces', () => {
|
||||
before(async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce');
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce_kibana_spaces'); // multiple spaces with different config settings
|
||||
await esArchiver.load(spacesSharedObjectsArchive); // multiple spaces with different config settings
|
||||
await reportingAPI.initEcommerce();
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce');
|
||||
await esArchiver.unload(
|
||||
'x-pack/test/functional/es_archives/reporting/ecommerce_kibana_spaces'
|
||||
);
|
||||
await reportingAPI.teardownEcommerce();
|
||||
await reportingAPI.deleteAllReports();
|
||||
await esArchiver.unload(spacesSharedObjectsArchive);
|
||||
});
|
||||
|
||||
describe('CSV saved search export', () => {
|
||||
|
|
|
@ -49,12 +49,12 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
describe('Job Listing APIs', () => {
|
||||
before(async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/logs');
|
||||
await reportingAPI.initLogs();
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/logstash_functional');
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/logs');
|
||||
await reportingAPI.teardownLogs();
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
|
||||
});
|
||||
|
||||
|
|
|
@ -27,19 +27,16 @@ const parseApiJSON = (apiResponseText: string): { job: ReportApiJSON; path: stri
|
|||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default function ({ getService }: FtrProviderContext) {
|
||||
const esArchiver = getService('esArchiver');
|
||||
const supertestNoAuth = getService('supertestWithoutAuth');
|
||||
const reportingAPI = getService('reportingAPI');
|
||||
|
||||
describe('Job Listing APIs: Deprecated CSV Export', () => {
|
||||
before(async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/logs');
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/logstash_functional');
|
||||
await reportingAPI.initLogs();
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/logs');
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
|
||||
await reportingAPI.teardownLogs();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
|
|
|
@ -29,7 +29,9 @@ export function createScenarios({ getService }: Pick<FtrProviderContext, 'getSer
|
|||
const kibanaServer = getService('kibanaServer');
|
||||
const supertestWithoutAuth = getService('supertestWithoutAuth');
|
||||
const retry = getService('retry');
|
||||
|
||||
const ecommerceSOPath = 'x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce.json';
|
||||
const logsSOPath = 'x-pack/test/functional/fixtures/kbn_archiver/reporting/logs';
|
||||
|
||||
const DATA_ANALYST_USERNAME = 'data_analyst';
|
||||
const DATA_ANALYST_PASSWORD = 'data_analyst-password';
|
||||
|
@ -60,6 +62,15 @@ export function createScenarios({ getService }: Pick<FtrProviderContext, 'getSer
|
|||
await deleteAllReports();
|
||||
};
|
||||
|
||||
const initLogs = async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/logstash_functional');
|
||||
await kibanaServer.importExport.load(logsSOPath);
|
||||
};
|
||||
const teardownLogs = async () => {
|
||||
await kibanaServer.importExport.unload(logsSOPath);
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
|
||||
};
|
||||
|
||||
const createDataAnalystRole = async () => {
|
||||
await security.role.create('data_analyst', {
|
||||
metadata: {},
|
||||
|
@ -222,6 +233,8 @@ export function createScenarios({ getService }: Pick<FtrProviderContext, 'getSer
|
|||
logTaskManagerHealth,
|
||||
initEcommerce,
|
||||
teardownEcommerce,
|
||||
initLogs,
|
||||
teardownLogs,
|
||||
DATA_ANALYST_USERNAME,
|
||||
DATA_ANALYST_PASSWORD,
|
||||
REPORTING_USER_USERNAME,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue