From 711e828c79dda147aecb1355cc4f7b032f8bd3e1 Mon Sep 17 00:00:00 2001 From: Anton Dosov Date: Fri, 12 Jan 2024 15:22:11 +0100 Subject: [PATCH] fix tests --- .../reporting_and_security/__snapshots__/csv_v2_esql.snap | 7 ++++++- .../reporting_and_security/csv_v2_esql.ts | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/__snapshots__/csv_v2_esql.snap b/x-pack/test/reporting_api_integration/reporting_and_security/__snapshots__/csv_v2_esql.snap index 45bee8a3913bf4..12b790ea42ae12 100644 --- a/x-pack/test/reporting_api_integration/reporting_and_security/__snapshots__/csv_v2_esql.snap +++ b/x-pack/test/reporting_api_integration/reporting_and_security/__snapshots__/csv_v2_esql.snap @@ -22,7 +22,12 @@ Object { `; exports[`Reporting APIs CSV Generation from ES|QL export from timebased data view csv from es|ql export with time filter csv file matches 1`] = ` -"\\"@message\\",\\"@message.raw\\",\\"@tags\\",\\"@tags.raw\\",\\"@timestamp\\",agent,\\"agent.raw\\",bytes,clientip,extension,\\"extension.raw\\",\\"geo.coordinates\\",\\"geo.dest\\",\\"geo.src\\",\\"geo.srcdest\\",headings,\\"headings.raw\\",host,\\"host.raw\\",id,index,\\"index.raw\\",ip,links,\\"links.raw\\",\\"machine.os\\",\\"machine.os.raw\\",\\"machine.ram\\",\\"machine.ram_range\\",memory,\\"meta.char\\",\\"meta.related\\",\\"meta.user.firstname\\",\\"meta.user.lastname\\",phpmemory,referer,\\"relatedContent.article:modified_time\\",\\"relatedContent.article:published_time\\",\\"relatedContent.article:section\\",\\"relatedContent.article:section.raw\\",\\"relatedContent.article:tag\\",\\"relatedContent.article:tag.raw\\",\\"relatedContent.og:description\\",\\"relatedContent.og:description.raw\\",\\"relatedContent.og:image\\",\\"relatedContent.og:image.raw\\",\\"relatedContent.og:image:height\\",\\"relatedContent.og:image:height.raw\\",\\"relatedContent.og:image:width\\",\\"relatedContent.og:image:width.raw\\",\\"relatedContent.og:site_name\\",\\"relatedContent.og:site_name.raw\\",\\"relatedContent.og:title\\",\\"relatedContent.og:title.raw\\",\\"relatedContent.og:type\\",\\"relatedContent.og:type.raw\\",\\"relatedContent.og:url\\",\\"relatedContent.og:url.raw\\",\\"relatedContent.twitter:card\\",\\"relatedContent.twitter:card.raw\\",\\"relatedContent.twitter:description\\",\\"relatedContent.twitter:description.raw\\",\\"relatedContent.twitter:image\\",\\"relatedContent.twitter:image.raw\\",\\"relatedContent.twitter:site\\",\\"relatedContent.twitter:site.raw\\",\\"relatedContent.twitter:title\\",\\"relatedContent.twitter:title.raw\\",\\"relatedContent.url\\",\\"relatedContent.url.raw\\",request,\\"request.raw\\",response,\\"response.raw\\",spaces,\\"spaces.raw\\",type,url,\\"url.raw\\",\\"utc_time\\",xss,\\"xss.raw\\" +"\\"@message\\" +\\"143.84.142.7 - - [2015-09-20T00:00:00.000Z] \\"\\"GET /uploads/steven-hawley.jpg HTTP/1.1\\"\\" 200 1623 \\"\\"-\\"\\" \\"\\"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)\\"\\"\\" +\\"193.164.192.47 - - [2015-09-20T00:30:34.206Z] \\"\\"GET /uploads/michael-foreman.jpg HTTP/1.1\\"\\" 200 8537 \\"\\"-\\"\\" \\"\\"Mozilla/5.0 (X11; Linux x86_64; rv:6.0a1) Gecko/20110421 Firefox/6.0a1\\"\\"\\" +\\"176.7.244.68 - - [2015-09-20T00:32:42.058Z] \\"\\"GET /uploads/james-pawelczyk.jpg HTTP/1.1\\"\\" 200 9196 \\"\\"-\\"\\" \\"\\"Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.50 Safari/534.24\\"\\"\\" +\\"237.56.90.184 - - [2015-09-20T00:35:21.445Z] \\"\\"GET /uploads/david-leestma.jpg HTTP/1.1\\"\\" 200 9790 \\"\\"-\\"\\" \\"\\"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)\\"\\"\\" +\\"255.56.89.50 - - [2015-09-20T00:43:01.353Z] \\"\\"GET /uploads/michael-r-barratt.jpg HTTP/1.1\\"\\" 200 9583 \\"\\"-\\"\\" \\"\\"Mozilla/5.0 (X11; Linux x86_64; rv:6.0a1) Gecko/20110421 Firefox/6.0a1\\"\\"\\" " `; diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/csv_v2_esql.ts b/x-pack/test/reporting_api_integration/reporting_and_security/csv_v2_esql.ts index c35a95b9851cd6..09a1da86b72d61 100644 --- a/x-pack/test/reporting_api_integration/reporting_and_security/csv_v2_esql.ts +++ b/x-pack/test/reporting_api_integration/reporting_and_security/csv_v2_esql.ts @@ -159,7 +159,7 @@ export default ({ getService }: FtrProviderContext) => { id: 'DISCOVER_APP_LOCATOR', version: '8.13.0', params: { - columns: [], + columns: ['@message'], dataViewSpec: { allowHidden: false, allowNoIndex: false, @@ -174,7 +174,7 @@ export default ({ getService }: FtrProviderContext) => { filters: [], index: '0ed8b65f-ec8f-4061-9d2e-542cd6ff10a6', interval: 'auto', - query: { esql: 'from logstash-* | limit 10' }, + query: { esql: 'from logstash-* | sort @timestamp | limit 5' }, refreshInterval: { pause: true, value: 60000 }, sort: [['@timestamp', 'desc']], timeRange: { from: '2015-09-18T22:00:00.000Z', to: '2015-09-23T22:00:00.000Z' },