Skip to content

Commit

Permalink
Remove options.workspaces drop behavior in conflict client wrapper
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Wang <[email protected]>
  • Loading branch information
wanglam committed Jun 28, 2024
1 parent 30fab0d commit 17b36b6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -499,20 +499,4 @@ describe('WorkspaceConflictSavedObjectsClientWrapper', () => {
);
});
});

describe('find', () => {
beforeEach(() => {
mockedClient.find.mockClear();
});

it(`workspaces parameters should be removed when finding data sources`, async () => {
await wrapperClient.find({
type: DATA_SOURCE_SAVED_OBJECT_TYPE,
workspaces: ['foo'],
});
expect(mockedClient.find).toBeCalledWith({
type: DATA_SOURCE_SAVED_OBJECT_TYPE,
});
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,7 @@ export class WorkspaceConflictSavedObjectsClientWrapper {
bulkCreate: bulkCreateWithWorkspaceConflictCheck,
checkConflicts: checkConflictWithWorkspaceConflictCheck,
delete: wrapperOptions.client.delete,
find: (options: SavedObjectsFindOptions) =>
// TODO: The `formatFindParams` is a workaround for 2.14 to always list global data sources,
// should remove this workaround in the upcoming release once readonly share is available.
wrapperOptions.client.find(this.formatFindParams(options)),
find: wrapperOptions.client.find,
bulkGet: wrapperOptions.client.bulkGet,
get: wrapperOptions.client.get,
update: wrapperOptions.client.update,
Expand Down

0 comments on commit 17b36b6

Please sign in to comment.