-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(crud): update to latest specs #1622
Fixes bulkWrite to pass on arrayFilters Fixes insertMany to return insertedIds in the correct format Adds tests for bulkWrite, insertOne and insertMany Updates the tests files from the specification directory. NODE-1228
- Loading branch information
Jessica Lord
authored
Dec 21, 2017
1 parent
44373f3
commit 6eede98
Showing
81 changed files
with
312 additions
and
1,070 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
110 changes: 110 additions & 0 deletions
110
test/functional/spec/crud/write/bulkWrite-arrayFilters.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"_id": 1, | ||
"y": [ | ||
{ | ||
"b": 3 | ||
}, | ||
{ | ||
"b": 1 | ||
} | ||
] | ||
}, | ||
{ | ||
"_id": 2, | ||
"y": [ | ||
{ | ||
"b": 0 | ||
}, | ||
{ | ||
"b": 1 | ||
} | ||
] | ||
} | ||
], | ||
"minServerVersion": "3.5.6", | ||
"tests": [ | ||
{ | ||
"description": "BulkWrite with arrayFilters", | ||
"operation": { | ||
"arguments": { | ||
"options": { | ||
"ordered": true | ||
}, | ||
"requests": [ | ||
{ | ||
"arguments": { | ||
"arrayFilters": [ | ||
{ | ||
"i.b": 3 | ||
} | ||
], | ||
"filter": {}, | ||
"update": { | ||
"$set": { | ||
"y.$[i].b": 2 | ||
} | ||
} | ||
}, | ||
"name": "updateOne" | ||
}, | ||
{ | ||
"arguments": { | ||
"arrayFilters": [ | ||
{ | ||
"i.b": 1 | ||
} | ||
], | ||
"filter": {}, | ||
"update": { | ||
"$set": { | ||
"y.$[i].b": 2 | ||
} | ||
} | ||
}, | ||
"name": "updateMany" | ||
} | ||
] | ||
}, | ||
"name": "bulkWrite" | ||
}, | ||
"outcome": { | ||
"collection": { | ||
"data": [ | ||
{ | ||
"_id": 1, | ||
"y": [ | ||
{ | ||
"b": 2 | ||
}, | ||
{ | ||
"b": 2 | ||
} | ||
] | ||
}, | ||
{ | ||
"_id": 2, | ||
"y": [ | ||
{ | ||
"b": 0 | ||
}, | ||
{ | ||
"b": 2 | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"result": { | ||
"deletedCount": 0, | ||
"insertedIds": {}, | ||
"matchedCount": 3, | ||
"modifiedCount": 3, | ||
"upsertedCount": 0, | ||
"upsertedIds": {} | ||
} | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.