Skip to content

Commit 431cf52

Browse files
GODRIVER-3524 Sync updates to reflect showExpandedEvents omissions (#2084)
1 parent 835c5e1 commit 431cf52

File tree

4 files changed

+15
-97
lines changed

4 files changed

+15
-97
lines changed

testdata/change-streams/change-streams-disambiguatedPaths.json

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"minServerVersion": "6.1.0",
2929
"topologies": [
3030
"replicaset",
31-
"sharded-replicaset",
3231
"load-balanced",
3332
"sharded"
3433
],
@@ -43,70 +42,6 @@
4342
}
4443
],
4544
"tests": [
46-
{
47-
"description": "disambiguatedPaths is not present when showExpandedEvents is false/unset",
48-
"operations": [
49-
{
50-
"name": "insertOne",
51-
"object": "collection0",
52-
"arguments": {
53-
"document": {
54-
"_id": 1,
55-
"a": {
56-
"1": 1
57-
}
58-
}
59-
}
60-
},
61-
{
62-
"name": "createChangeStream",
63-
"object": "collection0",
64-
"arguments": {
65-
"pipeline": []
66-
},
67-
"saveResultAsEntity": "changeStream0"
68-
},
69-
{
70-
"name": "updateOne",
71-
"object": "collection0",
72-
"arguments": {
73-
"filter": {
74-
"_id": 1
75-
},
76-
"update": {
77-
"$set": {
78-
"a.1": 2
79-
}
80-
}
81-
}
82-
},
83-
{
84-
"name": "iterateUntilDocumentOrError",
85-
"object": "changeStream0",
86-
"expectResult": {
87-
"operationType": "update",
88-
"ns": {
89-
"db": "database0",
90-
"coll": "collection0"
91-
},
92-
"updateDescription": {
93-
"updatedFields": {
94-
"$$exists": true
95-
},
96-
"removedFields": {
97-
"$$exists": true
98-
},
99-
"truncatedArrays": {
100-
"$$exists": true
101-
},
102-
"disambiguatedPaths": {
103-
"$$exists": false
104-
}
105-
}
106-
}
107-
}
108-
]
109-
},
11045
{
11146
"description": "disambiguatedPaths is present on updateDescription when an ambiguous path is present",
11247
"operations": [
@@ -250,4 +185,3 @@
250185
}
251186
]
252187
}
253-

testdata/change-streams/change-streams-disambiguatedPaths.yml

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ createEntities:
1515

1616
runOnRequirements:
1717
- minServerVersion: "6.1.0"
18-
topologies: [ replicaset, sharded-replicaset, load-balanced, sharded ]
18+
topologies: [ replicaset, load-balanced, sharded ]
1919
serverless: forbid
2020

2121
initialData:
@@ -24,32 +24,6 @@ initialData:
2424
documents: []
2525

2626
tests:
27-
- description: "disambiguatedPaths is not present when showExpandedEvents is false/unset"
28-
operations:
29-
- name: insertOne
30-
object: *collection0
31-
arguments:
32-
document: { _id: 1, 'a': { '1': 1 } }
33-
- name: createChangeStream
34-
object: *collection0
35-
arguments: { pipeline: [] }
36-
saveResultAsEntity: &changeStream0 changeStream0
37-
- name: updateOne
38-
object: *collection0
39-
arguments:
40-
filter: { _id: 1 }
41-
update: { $set: { 'a.1': 2 } }
42-
- name: iterateUntilDocumentOrError
43-
object: *changeStream0
44-
expectResult:
45-
operationType: "update"
46-
ns: { db: *database0, coll: *collection0 }
47-
updateDescription:
48-
updatedFields: { $$exists: true }
49-
removedFields: { $$exists: true }
50-
truncatedArrays: { $$exists: true }
51-
disambiguatedPaths: { $$exists: false }
52-
5327
- description: "disambiguatedPaths is present on updateDescription when an ambiguous path is present"
5428
operations:
5529
- name: insertOne
@@ -101,4 +75,3 @@ tests:
10175
removedFields: { $$exists: true }
10276
truncatedArrays: { $$exists: true }
10377
disambiguatedPaths: { 'a.0.1': ['a', { $$type: 'int' }, '1'] }
104-

testdata/change-streams/change-streams.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,12 @@
181181
"field": "array",
182182
"newSize": 2
183183
}
184-
]
184+
],
185+
"disambiguatedPaths": {
186+
"$$unsetOrMatches": {
187+
"$$exists": true
188+
}
189+
}
185190
}
186191
}
187192
}
@@ -1409,6 +1414,11 @@
14091414
"$$unsetOrMatches": {
14101415
"$$exists": true
14111416
}
1417+
},
1418+
"disambiguatedPaths": {
1419+
"$$unsetOrMatches": {
1420+
"$$exists": true
1421+
}
14121422
}
14131423
}
14141424
}

testdata/change-streams/change-streams.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ tests:
115115
"field": "array",
116116
"newSize": 2
117117
}
118-
]
118+
],
119+
disambiguatedPaths: { $$unsetOrMatches: { $$exists: true } }
119120
}
120121
}
121122

@@ -140,7 +141,6 @@ tests:
140141
comment: *comment0
141142

142143
- description: "Test with document comment - pre 4.4"
143-
skipReason: "TODO(GODRIVER-2386): aggregate only supports string comments"
144144
runOnRequirements:
145145
- maxServerVersion: "4.2.99"
146146
operations:
@@ -723,6 +723,7 @@ tests:
723723
updatedFields: { x: 2 }
724724
removedFields: []
725725
truncatedArrays: { $$unsetOrMatches: { $$exists: true } }
726+
disambiguatedPaths: { $$unsetOrMatches: { $$exists: true } }
726727
- name: iterateUntilDocumentOrError
727728
object: *changeStream0
728729
expectResult:

0 commit comments

Comments
 (0)