From 7db84d9776f5bb67eef1c7d331a870f2338a6b8d Mon Sep 17 00:00:00 2001 From: Lin Wang Date: Wed, 28 Feb 2024 12:15:51 +0800 Subject: [PATCH] fix workspace client wrapper integration tests Signed-off-by: Lin Wang --- .../workspace_saved_objects_client_wrapper.test.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/plugins/workspace/server/saved_objects/integration_tests/workspace_saved_objects_client_wrapper.test.ts b/src/plugins/workspace/server/saved_objects/integration_tests/workspace_saved_objects_client_wrapper.test.ts index 68717ccf80fc..9f4f46b4dc99 100644 --- a/src/plugins/workspace/server/saved_objects/integration_tests/workspace_saved_objects_client_wrapper.test.ts +++ b/src/plugins/workspace/server/saved_objects/integration_tests/workspace_saved_objects_client_wrapper.test.ts @@ -3,15 +3,18 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ISavedObjectsRepository, SavedObjectsClientContract } from 'src/core/server'; - import { createTestServers, TestOpenSearchUtils, TestOpenSearchDashboardsUtils, TestUtils, } from '../../../../../core/test_helpers/osd_server'; -import { SavedObjectsErrorHelpers } from '../../../../../core/server'; +import { + SavedObjectsErrorHelpers, + WORKSPACE_TYPE, + ISavedObjectsRepository, + SavedObjectsClientContract, +} from '../../../../../core/server'; import { httpServerMock } from '../../../../../../src/core/server/mocks'; import * as utilsExports from '../../utils'; @@ -77,7 +80,9 @@ describe('WorkspaceSavedObjectsClientWrapper', () => { opensearchServer = await servers.startOpenSearch(); osd = await servers.startOpenSearchDashboards(); - internalSavedObjectsRepository = osd.coreStart.savedObjects.createInternalRepository(); + internalSavedObjectsRepository = osd.coreStart.savedObjects.createInternalRepository([ + WORKSPACE_TYPE, + ]); await repositoryKit.create( internalSavedObjectsRepository,