Skip to content

Commit

Permalink
[Reporting] API Integration tests: fix flaky tests for Spaces CSV for…
Browse files Browse the repository at this point in the history
…matting (#78849) (#79021)

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
tsullivan and elasticmachine authored Oct 1, 2020
1 parent 6cb471e commit 3f22764
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default function ({ getService }: FtrProviderContext) {
});

it('should use formats from non-default spaces', async () => {
setSpaceConfig('non_default_space', {
await setSpaceConfig('non_default_space', {
'csv:separator': ';',
'csv:quoteValues': false,
'dateFormat:tz': 'US/Alaska',
Expand All @@ -82,7 +82,10 @@ export default function ({ getService }: FtrProviderContext) {
it(`should use browserTimezone in jobParams for date formatting`, async () => {
const tzParam = 'America/Phoenix';
const tzSettings = 'Browser';
setSpaceConfig('non_default_space', { 'csv:separator': ';', 'dateFormat:tz': tzSettings });
await setSpaceConfig('non_default_space', {
'csv:separator': ';',
'dateFormat:tz': tzSettings,
});
const path = await reportingAPI.postJobJSON(`/api/reporting/generate/csv`, {
jobParams: `(browserTimezone:${tzParam},conflictedTypesFields:!(),fields:!(order_date,category,customer_full_name,taxful_total_price,currency),indexPatternId:aac3e500-f2c7-11ea-8250-fb138aa491e7,metaFields:!(_source,_id,_type,_index,_score),objectType:search,searchRequest:(body:(_source:(includes:!(order_date,category,customer_full_name,taxful_total_price,currency)),docvalue_fields:!((field:order_date,format:date_time)),query:(bool:(filter:!((match_all:()),(range:(order_date:(format:strict_date_optional_time,gte:'2019-05-30T05:09:59.743Z',lte:'2019-07-26T08:47:09.682Z')))),must:!(),must_not:!(),should:!())),script_fields:(),sort:!((order_date:(order:desc,unmapped_type:boolean))),stored_fields:!(order_date,category,customer_full_name,taxful_total_price,currency),version:!t),index:'ec*'),title:'EC SEARCH from DEFAULT')`,
});
Expand Down

0 comments on commit 3f22764

Please sign in to comment.