Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: yujin-emma <yujin.emma.work@gmail.com>
  • Loading branch information
yujin-emma committed Feb 6, 2024
1 parent ddc0aa9 commit 4826769
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,6 @@ describe('#checkConflictsForDataSource', () => {
});
});

it('returns original objects result when there is no data source id', async () => {
const params = setupParams({ objects });
const checkConflictsForDataSourceResult = await checkConflictsForDataSource(params);
expect(checkConflictsForDataSourceResult).toEqual({
filteredObjects: [...objects],
errors: [],
importIdMap: new Map(),
pendingOverwrites: new Set(),
});
});

it('return obj if it is not data source obj and there is no conflict of the data source id', async () => {
const params = setupParams({ objects: objectsWithDataSource, dataSourceId: 'ds' });
const checkConflictsForDataSourceResult = await checkConflictsForDataSource(params);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ describe('#importSavedObjectsFromStream', () => {
const setupOptions = (
createNewCopies: boolean = false,
dataSourceId: string | undefined = undefined

): SavedObjectsImportOptions => {
readStream = new Readable();
savedObjectsClient = savedObjectsClientMock.create();
Expand Down Expand Up @@ -392,7 +391,10 @@ describe('#importSavedObjectsFromStream', () => {
const dataSourceObj1 = createObject(testDataSourceId);
const tmp2 = createObject(testDataSourceId);
const dataSourceObj2 = { ...tmp2, destinationId: 'some-destinationId', originId: tmp.id };
const dataSourceObj3 = { ...createObject(testDataSourceId), destinationId: 'another-destinationId' };
const dataSourceObj3 = {
...createObject(testDataSourceId),
destinationId: 'another-destinationId',
};
const createdDsObjects = [dataSourceObj1, dataSourceObj2, dataSourceObj3];

// results
Expand Down

0 comments on commit 4826769

Please sign in to comment.