From e160be3e37b073ba8882ebb707ef47bcc0fffd18 Mon Sep 17 00:00:00 2001 From: Lukas Olson Date: Fri, 20 Aug 2021 09:59:40 -0700 Subject: [PATCH] Remove legacy tests --- .../search_source/search_source.test.ts | 42 +------------------ 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/src/plugins/data/common/search/search_source/search_source.test.ts b/src/plugins/data/common/search/search_source/search_source.test.ts index 90a13c076839b..02144def7acc1 100644 --- a/src/plugins/data/common/search/search_source/search_source.test.ts +++ b/src/plugins/data/common/search/search_source/search_source.test.ts @@ -8,9 +8,8 @@ import { of } from 'rxjs'; import { IndexPattern } from '../../index_patterns'; -import { GetConfigFn } from '../../types'; import { SearchSource, SearchSourceDependencies, SortDirection } from './'; -import { AggConfigs, AggTypesRegistryStart, ES_SEARCH_STRATEGY } from '../../'; +import { AggConfigs, AggTypesRegistryStart } from '../../'; import { mockAggTypesRegistry } from '../aggs/test_helpers'; import { RequestResponder } from 'src/plugins/inspector/common'; import { switchMap } from 'rxjs/operators'; @@ -953,45 +952,6 @@ describe('SearchSource', () => { }); describe('fetch$', () => { - describe('#legacy COURIER_BATCH_SEARCHES', () => { - beforeEach(() => { - searchSourceDependencies = { - ...searchSourceDependencies, - getConfig: jest.fn(() => { - return true; // batchSearches = true - }) as GetConfigFn, - }; - }); - - test('should override to use sync search if not set', async () => { - searchSource = new SearchSource({ index: indexPattern }, searchSourceDependencies); - const options = {}; - await searchSource.fetch$(options).toPromise(); - - const [, callOptions] = mockSearchMethod.mock.calls[0]; - expect(callOptions.strategy).toBe(ES_SEARCH_STRATEGY); - }); - - test('should remove searchSessionId when forcing ES_SEARCH_STRATEGY', async () => { - searchSource = new SearchSource({ index: indexPattern }, searchSourceDependencies); - const options = { sessionId: 'test' }; - await searchSource.fetch$(options).toPromise(); - - const [, callOptions] = mockSearchMethod.mock.calls[0]; - expect(callOptions.strategy).toBe(ES_SEARCH_STRATEGY); - expect(callOptions.sessionId).toBeUndefined(); - }); - - test('should not override strategy if set ', async () => { - searchSource = new SearchSource({ index: indexPattern }, searchSourceDependencies); - const options = { strategy: 'banana' }; - await searchSource.fetch$(options).toPromise(); - - const [, callOptions] = mockSearchMethod.mock.calls[0]; - expect(callOptions.strategy).toBe('banana'); - }); - }); - describe('responses', () => { test('should return partial results', async () => { searchSource = new SearchSource({ index: indexPattern }, searchSourceDependencies);