From b4411b3ecaaa53974f53ca8c7c35b1bbe1c33c71 Mon Sep 17 00:00:00 2001 From: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> Date: Fri, 12 Apr 2024 00:51:30 +0000 Subject: [PATCH] Fix ut Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> --- .../server/lib/fetch_data_source_id.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/vis_type_timeline/server/lib/fetch_data_source_id.test.ts b/src/plugins/vis_type_timeline/server/lib/fetch_data_source_id.test.ts index 5fc89afe3332..52fb3adc3430 100644 --- a/src/plugins/vis_type_timeline/server/lib/fetch_data_source_id.test.ts +++ b/src/plugins/vis_type_timeline/server/lib/fetch_data_source_id.test.ts @@ -23,6 +23,7 @@ describe('fetchDataSourceIdByName()', () => { index: null, timefield: null, kibana: null, + opensearchDashboards: null, interval: null, }; const client = savedObjectsClientMock.create(); @@ -104,7 +105,9 @@ describe('fetchDataSourceIdByName()', () => { it('should throw errors when MDS is disabled', async () => { await expect( fetchDataSourceIdByName({ ...config, data_source_name: 'Some Data Source' }, client) - ).rejects.toThrowError('data_source_name cannot be used because data_source.enabled is false'); + ).rejects.toThrowError( + 'To query from multiple data sources, first enable the data sources feature' + ); }); it.each([