From 6b692abda6cc52d41365c59a2db75b2dc69d5372 Mon Sep 17 00:00:00 2001 From: Marta Bondyra Date: Tue, 3 Mar 2020 15:59:26 +0100 Subject: [PATCH] fix: integration tests --- x-pack/test/api_integration/apis/lens/existing_fields.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/x-pack/test/api_integration/apis/lens/existing_fields.ts b/x-pack/test/api_integration/apis/lens/existing_fields.ts index cf65e114d38965..881c622e4dd3ee 100644 --- a/x-pack/test/api_integration/apis/lens/existing_fields.ts +++ b/x-pack/test/api_integration/apis/lens/existing_fields.ts @@ -10,6 +10,7 @@ import { FtrProviderContext } from '../../ftr_provider_context'; const TEST_START_TIME = encodeURIComponent('2015-09-19T06:31:44.000'); const TEST_END_TIME = encodeURIComponent('2015-09-23T18:31:44.000'); +const DSL_QUERY = JSON.stringify({ match_all: {} }); const COMMON_HEADERS = { 'kbn-xsrf': 'some-xsrf-token', }; @@ -150,7 +151,7 @@ export default ({ getService }: FtrProviderContext) => { .get( `/api/lens/existing_fields/${encodeURIComponent( 'logstash-*' - )}?fromDate=${TEST_START_TIME}&toDate=${TEST_END_TIME}` + )}?fromDate=${TEST_START_TIME}&toDate=${TEST_END_TIME}&dslQuery=${DSL_QUERY}` ) .set(COMMON_HEADERS) .expect(200); @@ -164,7 +165,7 @@ export default ({ getService }: FtrProviderContext) => { .get( `/api/lens/existing_fields/${encodeURIComponent( 'metricbeat-*' - )}?fromDate=${TEST_START_TIME}&toDate=${TEST_END_TIME}` + )}?fromDate=${TEST_START_TIME}&toDate=${TEST_END_TIME}&dslQuery=${DSL_QUERY}` ) .set(COMMON_HEADERS) .expect(200); @@ -176,7 +177,7 @@ export default ({ getService }: FtrProviderContext) => { it('should throw a 404 for a non-existent index', async () => { await supertest .get( - `/api/lens/existing_fields/nadachance?fromDate=${TEST_START_TIME}&toDate=${TEST_END_TIME}` + `/api/lens/existing_fields/nadachance?fromDate=${TEST_START_TIME}&toDate=${TEST_END_TIME}&dslQuery=${DSL_QUERY}` ) .set(COMMON_HEADERS) .expect(404);