Skip to content

Commit

Permalink
Cleanup search params test
Browse files Browse the repository at this point in the history
  • Loading branch information
Liza K committed Jan 12, 2020
1 parent ca9dea0 commit 30b9478
Showing 1 changed file with 0 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,6 @@ describe('getMSearchParams', () => {
});

describe('getSearchParams', () => {
test('includes rest_total_hits_as_int', () => {
const config = getConfigStub();
const searchParams = getSearchParams(config);
expect(searchParams.rest_total_hits_as_int).toBe(true);
});

test('includes ignore_unavailable', () => {
const config = getConfigStub();
const searchParams = getSearchParams(config);
expect(searchParams.ignore_unavailable).toBe(true);
});

test('includes ignore_throttled according to search:includeFrozen', () => {
let config = getConfigStub({ 'search:includeFrozen': true });
let searchParams = getSearchParams(config);
Expand All @@ -97,13 +85,4 @@ describe('getSearchParams', () => {
searchParams = getSearchParams(config);
expect(searchParams.max_concurrent_shard_requests).toBe(5);
});

test('includes timeout according to esShardTimeout if greater than 0', () => {
const config = getConfigStub();
let searchParams = getSearchParams(config, 0);
expect(searchParams.timeout).toBe(undefined);

searchParams = getSearchParams(config, 100);
expect(searchParams.timeout).toBe('100ms');
});
});

0 comments on commit 30b9478

Please sign in to comment.