Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 49 additions & 1 deletion data/crud/test_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,54 @@ v1/write/updateOne.json
v2/aggregate-merge.json
v2/aggregate-out-readConcern.json
v2/bulkWrite-arrayFilters.json
v2/bulkWrite-delete-hint-clientError.json
v2/bulkWrite-delete-hint.json
v2/bulkWrite-delete-hint-serverError.json
v2/bulkWrite-update-hint-clientError.json
v2/bulkWrite-update-hint.json
v2/bulkWrite-update-hint-serverError.json
v2/db-aggregate.json
v2/deleteMany-hint-clientError.json
v2/deleteMany-hint.json
v2/deleteMany-hint-serverError.json
v2/deleteOne-hint-clientError.json
v2/deleteOne-hint.json
v2/deleteOne-hint-serverError.json
v2/findOneAndDelete-hint-clientError.json
v2/findOneAndDelete-hint.json
v2/findOneAndDelete-hint-serverError.json
v2/findOneAndReplace-hint-clientError.json
v2/findOneAndReplace-hint.json
v2/findOneAndReplace-hint-serverError.json
v2/findOneAndUpdate-hint-clientError.json
v2/findOneAndUpdate-hint.json
v2/findOneAndUpdate-hint-serverError.json
v2/replaceOne-hint.json
v2/unacknowledged-bulkWrite-delete-hint-clientError.json
v2/unacknowledged-bulkWrite-delete-hint.json
v2/unacknowledged-bulkWrite-update-hint-clientError.json
v2/unacknowledged-bulkWrite-update-hint.json
v2/unacknowledged-deleteMany-hint-clientError.json
v2/unacknowledged-deleteMany-hint.json
v2/unacknowledged-deleteOne-hint-clientError.json
v2/unacknowledged-deleteOne-hint.json
v2/unacknowledged-findOneAndDelete-hint-clientError.json
v2/unacknowledged-findOneAndDelete-hint.json
v2/unacknowledged-findOneAndReplace-hint-clientError.json
v2/unacknowledged-findOneAndReplace-hint.json
v2/unacknowledged-findOneAndUpdate-hint-clientError.json
v2/unacknowledged-findOneAndUpdate-hint.json
v2/unacknowledged-replaceOne-hint-clientError.json
v2/unacknowledged-replaceOne-hint.json
v2/unacknowledged-updateMany-hint-clientError.json
v2/unacknowledged-updateMany-hint.json
v2/unacknowledged-updateOne-hint-clientError.json
v2/unacknowledged-updateOne-hint.json
v2/updateMany-hint-clientError.json
v2/updateMany-hint.json
v2/updateMany-hint-serverError.json
v2/updateOne-hint-clientError.json
v2/updateOne-hint.json
v2/updateOne-hint-serverError.json
v2/find-allowdiskuse.json
v2/updateWithPipelines.json
v2/updateWithPipelines.json
102 changes: 84 additions & 18 deletions data/crud/v2/bulkWrite-arrayFilters.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"database_name": "crud-tests",
"tests": [
{
"description": "BulkWrite with arrayFilters",
"description": "BulkWrite updateOne with arrayFilters",
"operations": [
{
"name": "bulkWrite",
Expand All @@ -53,7 +53,86 @@
}
]
}
},
}
],
"options": {
"ordered": true
}
},
"result": {
"deletedCount": 0,
"insertedCount": 0,
"insertedIds": {},
"matchedCount": 1,
"modifiedCount": 1,
"upsertedCount": 0,
"upsertedIds": {}
}
}
],
"expectations": [
{
"command_started_event": {
"command": {
"update": "test",
"updates": [
{
"q": {},
"u": {
"$set": {
"y.$[i].b": 2
}
},
"arrayFilters": [
{
"i.b": 3
}
]
}
],
"ordered": true
},
"command_name": "update",
"database_name": "crud-tests"
}
}
],
"outcome": {
"collection": {
"data": [
{
"_id": 1,
"y": [
{
"b": 2
},
{
"b": 1
}
]
},
{
"_id": 2,
"y": [
{
"b": 0
},
{
"b": 1
}
]
}
]
}
}
},
{
"description": "BulkWrite updateMany with arrayFilters",
"operations": [
{
"name": "bulkWrite",
"arguments": {
"requests": [
{
"name": "updateMany",
"arguments": {
Expand All @@ -79,8 +158,8 @@
"deletedCount": 0,
"insertedCount": 0,
"insertedIds": {},
"matchedCount": 3,
"modifiedCount": 3,
"matchedCount": 2,
"modifiedCount": 2,
"upsertedCount": 0,
"upsertedIds": {}
}
Expand All @@ -92,19 +171,6 @@
"command": {
"update": "test",
"updates": [
{
"q": {},
"u": {
"$set": {
"y.$[i].b": 2
}
},
"arrayFilters": [
{
"i.b": 3
}
]
},
{
"q": {},
"u": {
Expand Down Expand Up @@ -134,7 +200,7 @@
"_id": 1,
"y": [
{
"b": 2
"b": 3
},
{
"b": 2
Expand Down
150 changes: 150 additions & 0 deletions data/crud/v2/bulkWrite-delete-hint-clientError.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
{
"runOn": [
{
"maxServerVersion": "3.3.99"
}
],
"data": [
{
"_id": 1,
"x": 11
},
{
"_id": 2,
"x": 22
},
{
"_id": 3,
"x": 33
},
{
"_id": 4,
"x": 44
}
],
"collection_name": "BulkWrite_delete_hint",
"tests": [
{
"description": "BulkWrite deleteOne with hints unsupported (client-side error)",
"operations": [
{
"name": "bulkWrite",
"arguments": {
"requests": [
{
"name": "deleteOne",
"arguments": {
"filter": {
"_id": 1
},
"hint": "_id_"
}
},
{
"name": "deleteOne",
"arguments": {
"filter": {
"_id": 2
},
"hint": {
"_id": 1
}
}
}
],
"options": {
"ordered": true
}
},
"error": true
}
],
"expectations": [],
"outcome": {
"collection": {
"data": [
{
"_id": 1,
"x": 11
},
{
"_id": 2,
"x": 22
},
{
"_id": 3,
"x": 33
},
{
"_id": 4,
"x": 44
}
]
}
}
},
{
"description": "BulkWrite deleteMany with hints unsupported (client-side error)",
"operations": [
{
"name": "bulkWrite",
"arguments": {
"requests": [
{
"name": "deleteMany",
"arguments": {
"filter": {
"_id": {
"$lt": 3
}
},
"hint": "_id_"
}
},
{
"name": "deleteMany",
"arguments": {
"filter": {
"_id": {
"$gte": 4
}
},
"hint": {
"_id": 1
}
}
}
],
"options": {
"ordered": true
}
},
"error": true
}
],
"expectations": [],
"outcome": {
"collection": {
"data": [
{
"_id": 1,
"x": 11
},
{
"_id": 2,
"x": 22
},
{
"_id": 3,
"x": 33
},
{
"_id": 4,
"x": 44
}
]
}
}
}
]
}
Loading