Skip to content

Commit

Permalink
Fix test failure
Browse files Browse the repository at this point in the history
Signed-off-by: gaobinlong <gbinlong@amazon.com>
  • Loading branch information
gaobinlong committed Apr 9, 2024
1 parent ac7afb8 commit 6e57d03
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/core/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ export {
SavedObjectsDeleteByWorkspaceOptions,
updateDataSourceNameInVegaSpec,
extractVegaSpecFromSavedObject,
mockUuidv4,
} from './saved_objects';

export {
Expand Down
1 change: 0 additions & 1 deletion src/core/server/saved_objects/import/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ export {
SavedObjectsImportRetry,
} from './types';
export { updateDataSourceNameInVegaSpec, extractVegaSpecFromSavedObject } from './utils';
export { mockUuidv4 } from './__mocks__';
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jest.mock('../../../../core/server/saved_objects/export', () => ({

type SetupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;

const { v4: uuidv4 } = jest.requireActual('uuid');
const allowedTypes = ['index-pattern', 'visualization', 'dashboard'];
const URL = '/api/workspaces/_duplicate_saved_objects';
const exportSavedObjectsToStream = exportMock.exportSavedObjectsToStream as jest.Mock;
Expand Down Expand Up @@ -86,8 +85,6 @@ describe(`duplicate saved objects among workspaces`, () => {
};

beforeEach(async () => {
exportMock.mockUuidv4.mockReset();
exportMock.mockUuidv4.mockImplementation(() => uuidv4());
({ server, httpSetup, handlerContext } = await setupServer());
handlerContext.savedObjects.typeRegistry.getImportableAndExportableTypes.mockReturnValue(
allowedTypes.map(createExportableType)
Expand Down

0 comments on commit 6e57d03

Please sign in to comment.