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
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"minServerVersion": "6.1.0",
"topologies": [
"replicaset",
"sharded-replicaset",
"load-balanced",
"sharded"
],
Expand All @@ -43,70 +42,6 @@
}
],
"tests": [
{
"description": "disambiguatedPaths is not present when showExpandedEvents is false/unset",
"operations": [
{
"name": "insertOne",
"object": "collection0",
"arguments": {
"document": {
"_id": 1,
"a": {
"1": 1
}
}
}
},
{
"name": "createChangeStream",
"object": "collection0",
"arguments": {
"pipeline": []
},
"saveResultAsEntity": "changeStream0"
},
{
"name": "updateOne",
"object": "collection0",
"arguments": {
"filter": {
"_id": 1
},
"update": {
"$set": {
"a.1": 2
}
}
}
},
{
"name": "iterateUntilDocumentOrError",
"object": "changeStream0",
"expectResult": {
"operationType": "update",
"ns": {
"db": "database0",
"coll": "collection0"
},
"updateDescription": {
"updatedFields": {
"$$exists": true
},
"removedFields": {
"$$exists": true
},
"truncatedArrays": {
"$$exists": true
},
"disambiguatedPaths": {
"$$exists": false
}
}
}
}
]
},
{
"description": "disambiguatedPaths is present on updateDescription when an ambiguous path is present",
"operations": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,6 @@ initialData:
documents: []

tests:
- description: "disambiguatedPaths is not present when showExpandedEvents is false/unset"
operations:
- name: insertOne
object: *collection0
arguments:
document: { _id: 1, 'a': { '1': 1 } }
- name: createChangeStream
object: *collection0
arguments: { pipeline: [] }
saveResultAsEntity: &changeStream0 changeStream0
- name: updateOne
object: *collection0
arguments:
filter: { _id: 1 }
update: { $set: { 'a.1': 2 } }
- name: iterateUntilDocumentOrError
object: *changeStream0
expectResult:
operationType: "update"
ns: { db: *database0, coll: *collection0 }
updateDescription:
updatedFields: { $$exists: true }
removedFields: { $$exists: true }
truncatedArrays: { $$exists: true }
disambiguatedPaths: { $$exists: false }

- description: "disambiguatedPaths is present on updateDescription when an ambiguous path is present"
operations:
- name: insertOne
Expand Down
12 changes: 11 additions & 1 deletion test/spec/change-streams/unified/change-streams.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@
"field": "array",
"newSize": 2
}
]
],
"disambiguatedPaths": {
"$$unsetOrMatches": {
"$$exists": true
}
}
}
}
}
Expand Down Expand Up @@ -1408,6 +1413,11 @@
"$$unsetOrMatches": {
"$$exists": true
}
},
"disambiguatedPaths": {
"$$unsetOrMatches": {
"$$exists": true
}
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion test/spec/change-streams/unified/change-streams.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ tests:
"field": "array",
"newSize": 2
}
]
],
disambiguatedPaths: { $$unsetOrMatches: { $$exists: true } }
}
}

Expand Down Expand Up @@ -722,6 +723,7 @@ tests:
updatedFields: { x: 2 }
removedFields: []
truncatedArrays: { $$unsetOrMatches: { $$exists: true } }
disambiguatedPaths: { $$unsetOrMatches: { $$exists: true } }
- name: iterateUntilDocumentOrError
object: *changeStream0
expectResult:
Expand Down