Skip to content

Commit

Permalink
Fix integration test cases
Browse files Browse the repository at this point in the history
Also removed some dead code.
  • Loading branch information
jportner committed Aug 10, 2021
1 parent bea63d5 commit 15194e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,11 @@ export function importTestSuiteFactory(
type: 'conflict',
...(expectedNewId && { destinationId: expectedNewId }),
};
if (fail409Param === 'ambiguous_conflict_1a1b') {
// "ambiguous source" conflict
error = {
type: 'ambiguous_conflict',
destinations: [getConflictDest(`${CID}1`)],
};
} else if (fail409Param === 'ambiguous_conflict_2c') {
if (fail409Param === 'ambiguous_conflict_2c') {
// "ambiguous destination" conflict
error = {
type: 'ambiguous_conflict',
// response destinations should be sorted by updatedAt in descending order, then ID in ascending order
destinations: [getConflictDest(`${CID}2a`), getConflictDest(`${CID}2b`)],
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,15 +571,18 @@ export function copyToSpaceTestSuiteFactory(
expectNewCopyResponse(response, ambiguousConflictId, title);
} else {
// It doesn't matter if overwrite is enabled or not, the object will not be copied because there are two matches in the destination space
const updatedAt = '2017-09-21T18:59:16.270Z';
const destinations = [
// response should be sorted by updatedAt in descending order
// response destinations should be sorted by updatedAt in descending order, then ID in ascending order
{
id: 'conflict_2_all',
title: 'A shared saved-object in all spaces',
updatedAt: '2017-09-21T18:59:16.270Z',
},
{
id: 'conflict_2_space_2',
title: 'A shared saved-object in one space',
updatedAt,
updatedAt: '2017-09-21T18:59:16.270Z',
},
{ id: 'conflict_2_all', title: 'A shared saved-object in all spaces', updatedAt },
];
expect(success).to.eql(false);
expect(successCount).to.eql(0);
Expand Down

0 comments on commit 15194e5

Please sign in to comment.