diff --git a/CHANGELOG.md b/CHANGELOG.md index 92c7ea2ad85c..c40eaec15091 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,7 +46,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [Vis Builder] Add field summary popovers ([#2682](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2682)) - [I18n] Register ru, ru-RU locale ([#2817](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2817)) - Add yarn opensearch arg to setup plugin dependencies ([#2544](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2544)) -- [Multi DataSource] Add Test connection feature on data source create and update ([#2973](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2973)) +- [Multi DataSource] Test the connection to an external data source when creating or updating ([#2973](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2973)) + ### 🐛 Bug Fixes - [Vis Builder] Fixes auto bounds for timeseries bar chart visualization ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401)) diff --git a/src/plugins/data_source_management/public/components/create_data_source_wizard/create_data_source_wizard.test.tsx b/src/plugins/data_source_management/public/components/create_data_source_wizard/create_data_source_wizard.test.tsx index 3bba5e25c15b..162af4c891f7 100644 --- a/src/plugins/data_source_management/public/components/create_data_source_wizard/create_data_source_wizard.test.tsx +++ b/src/plugins/data_source_management/public/components/create_data_source_wizard/create_data_source_wizard.test.tsx @@ -70,7 +70,7 @@ describe('Datasource Management: Create Datasource Wizard', () => { expect(utils.createSingleDataSource).toHaveBeenCalled(); }); - test('should test connection successfully', async () => { + test('should test connection to the endpoint successfully', async () => { spyOn(utils, 'testConnection').and.returnValue({}); await act(async () => { @@ -82,7 +82,7 @@ describe('Datasource Management: Create Datasource Wizard', () => { expect(utils.testConnection).toHaveBeenCalled(); }); - test('should fail to test connection', async () => { + test('should fail to test connection to the endpoint', async () => { spyOn(utils, 'testConnection').and.throwError('error'); await act(async () => { // @ts-ignore diff --git a/src/plugins/data_source_management/public/components/utils.test.ts b/src/plugins/data_source_management/public/components/utils.test.ts index 8ed0d5caa40a..99bb126933a5 100644 --- a/src/plugins/data_source_management/public/components/utils.test.ts +++ b/src/plugins/data_source_management/public/components/utils.test.ts @@ -141,7 +141,7 @@ describe('DataSourceManagement: Utils.ts', () => { }); }); - describe('Test connection - success', () => { + describe('Test connection to the endpoint of the data source - success', () => { let http: jest.Mocked; const mockSuccess = jest.fn().mockResolvedValue({ body: { success: true } }); const mockError = jest.fn().mockRejectedValue(null); @@ -149,7 +149,7 @@ describe('DataSourceManagement: Utils.ts', () => { http = coreMock.createStart().http; http.post.mockResolvedValue(mockSuccess); }); - test('Success: Test Connection on create', async () => { + test('Success: Test Connection to the endpoint while creating a new data source', async () => { await testConnection(http, getDataSourceByIdWithoutCredential.attributes); expect(http.post.mock.calls).toMatchInlineSnapshot(` Array [ @@ -163,7 +163,7 @@ describe('DataSourceManagement: Utils.ts', () => { `); }); - test('Success: Test Connection on update', async () => { + test('Success: Test Connection to the endpoint while existing data source is updated', async () => { await testConnection(http, getDataSourceByIdWithoutCredential.attributes, 'test1234'); expect(http.post.mock.calls).toMatchInlineSnapshot(` Array [ @@ -176,7 +176,7 @@ describe('DataSourceManagement: Utils.ts', () => { ] `); }); - test('failure: Test connection', async () => { + test('failure: Test Connection to the endpoint while creating/updating a data source', async () => { try { http.post.mockRejectedValue(mockError); await testConnection(http, getDataSourceByIdWithoutCredential.attributes, 'test1234');