Skip to content

Commit

Permalink
fix: integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mbondyra committed Mar 4, 2020
1 parent 21429ea commit 6b692ab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions x-pack/test/api_integration/apis/lens/existing_fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
};
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 6b692ab

Please sign in to comment.