Skip to content

Commit 9e44e0d

Browse files
authored
Partially sync CRUD unified spec tests (#908)
GODRIVER-2376
1 parent 94985f5 commit 9e44e0d

17 files changed

+100
-77
lines changed

data/crud/unified/aggregate-write-readPreference.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ tests:
8787

8888
- description: "Aggregate with $out omits read preference for pre-5.0 server"
8989
runOnRequirements:
90-
# MongoDB 4.2 introduced support for read concerns and write stages.
91-
# Pre-4.2 servers may allow a "local" read concern anyway, but some
92-
# drivers may avoid inheriting a client-level read concern for pre-4.2.
90+
# MongoDB 4.2 introduced support for read concerns and write stages.
91+
# Pre-4.2 servers may allow a "local" read concern anyway, but some
92+
# drivers may avoid inheriting a client-level read concern for pre-4.2.
9393
- minServerVersion: "4.2"
9494
maxServerVersion: "4.4.99"
9595
serverless: "forbid"

data/crud/unified/bulkWrite-replaceOne-let.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@
9595
},
9696
"u": {
9797
"x": 3
98+
},
99+
"multi": {
100+
"$$unsetOrMatches": false
101+
},
102+
"upsert": {
103+
"$$unsetOrMatches": false
98104
}
99105
}
100106
],
@@ -183,6 +189,12 @@
183189
},
184190
"u": {
185191
"x": 3
192+
},
193+
"multi": {
194+
"$$unsetOrMatches": false
195+
},
196+
"upsert": {
197+
"$$unsetOrMatches": false
186198
}
187199
}
188200
],

data/crud/unified/bulkWrite-replaceOne-let.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ tests:
4747
updates:
4848
- q: *filter
4949
u: *replacement
50+
multi: { $$unsetOrMatches: false }
51+
upsert: { $$unsetOrMatches: false }
5052
let: *let
5153
outcome:
5254
- collectionName: *collection0Name
@@ -80,6 +82,8 @@ tests:
8082
updates:
8183
- q: *filter
8284
u: *replacement
85+
multi: { $$unsetOrMatches: false }
86+
upsert: { $$unsetOrMatches: false }
8387
let: *let
8488
outcome:
8589
- collectionName: *collection0Name

data/crud/unified/bulkWrite-update-hint-serverError.yml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,14 @@ tests:
7979
q: *updateOne_filter
8080
u: *updateOne_update
8181
hint: *hint_string
82-
multi:
83-
$$unsetOrMatches: false
84-
upsert:
85-
$$unsetOrMatches: false
82+
multi: { $$unsetOrMatches: false }
83+
upsert: { $$unsetOrMatches: false }
8684
-
8785
q: *updateOne_filter
8886
u: *updateOne_update
8987
hint: *hint_doc
90-
multi:
91-
$$unsetOrMatches: false
92-
upsert:
93-
$$unsetOrMatches: false
88+
multi: { $$unsetOrMatches: false }
89+
upsert: { $$unsetOrMatches: false }
9490
ordered: true
9591
outcome:
9692
-
@@ -148,15 +144,13 @@ tests:
148144
u: *updateMany_update
149145
multi: true
150146
hint: *hint_string
151-
upsert:
152-
$$unsetOrMatches: false
147+
upsert: { $$unsetOrMatches: false }
153148
-
154149
q: *updateMany_filter
155150
u: *updateMany_update
156151
multi: true
157152
hint: *hint_doc
158-
upsert:
159-
$$unsetOrMatches: false
153+
upsert: { $$unsetOrMatches: false }
160154
ordered: true
161155
outcome:
162156
-
@@ -215,20 +209,16 @@ tests:
215209
u:
216210
x: 333
217211
hint: *hint_string
218-
multi:
219-
$$unsetOrMatches: false
220-
upsert:
221-
$$unsetOrMatches: false
212+
multi: { $$unsetOrMatches: false }
213+
upsert: { $$unsetOrMatches: false }
222214
-
223215
q:
224216
_id: 4
225217
u:
226218
x: 444
227219
hint: *hint_doc
228-
multi:
229-
$$unsetOrMatches: false
230-
upsert:
231-
$$unsetOrMatches: false
220+
multi: { $$unsetOrMatches: false }
221+
upsert: { $$unsetOrMatches: false }
232222
ordered: true
233223
outcome:
234224
-

data/crud/unified/bulkWrite-updateMany-let.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ tests:
8585
- q: *filter
8686
u: *update
8787
multi: true
88-
upsert:
89-
$$unsetOrMatches: false
88+
upsert: { $$unsetOrMatches: false }
9089
let: *let
9190

9291
outcome:

data/crud/unified/replaceOne-hint.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,8 @@ tests:
6464
q: *filter
6565
u: *replacement
6666
hint: _id_
67-
multi:
68-
$$unsetOrMatches: false
69-
upsert:
70-
$$unsetOrMatches: false
67+
multi: { $$unsetOrMatches: false }
68+
upsert: { $$unsetOrMatches: false }
7169
outcome: &outcome
7270
-
7371
collectionName: *collection_name
@@ -105,8 +103,6 @@ tests:
105103
u: *replacement
106104
hint:
107105
_id: 1
108-
multi:
109-
$$unsetOrMatches: false
110-
upsert:
111-
$$unsetOrMatches: false
106+
multi: { $$unsetOrMatches: false }
107+
upsert: { $$unsetOrMatches: false }
112108
outcome: *outcome

data/crud/unified/replaceOne-let.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@
9494
},
9595
"u": {
9696
"x": "foo"
97+
},
98+
"multi": {
99+
"$$unsetOrMatches": false
100+
},
101+
"upsert": {
102+
"$$unsetOrMatches": false
97103
}
98104
}
99105
],
@@ -176,6 +182,12 @@
176182
},
177183
"u": {
178184
"x": "foo"
185+
},
186+
"multi": {
187+
"$$unsetOrMatches": false
188+
},
189+
"upsert": {
190+
"$$unsetOrMatches": false
179191
}
180192
}
181193
],

data/crud/unified/replaceOne-let.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ tests:
5151
-
5252
q: *filter
5353
u: *replacement
54+
multi: { $$unsetOrMatches: false }
55+
upsert: { $$unsetOrMatches: false }
5456
let: *let
5557
outcome:
5658
-
@@ -84,6 +86,8 @@ tests:
8486
-
8587
q: *filter
8688
u: *replacement
89+
multi: { $$unsetOrMatches: false }
90+
upsert: { $$unsetOrMatches: false }
8791
let: *let
8892
outcome:
8993
-

data/crud/unified/updateMany-hint-serverError.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ tests:
6868
u: *update
6969
multi: true
7070
hint: _id_
71-
upsert:
72-
$$unsetOrMatches: false
71+
upsert: { $$unsetOrMatches: false }
7372
outcome: &outcome
7473
-
7574
collectionName: *collection_name
@@ -112,6 +111,5 @@ tests:
112111
multi: true
113112
hint:
114113
_id: 1
115-
upsert:
116-
$$unsetOrMatches: false
114+
upsert: { $$unsetOrMatches: false }
117115
outcome: *outcome

data/crud/unified/updateMany-hint.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ tests:
6969
u: *update
7070
multi: true
7171
hint: _id_
72-
upsert:
73-
$$unsetOrMatches: false
72+
upsert: { $$unsetOrMatches: false }
7473
outcome: &outcome
7574
-
7675
collectionName: *collection_name
@@ -112,6 +111,5 @@ tests:
112111
multi: true
113112
hint:
114113
_id: 1
115-
upsert:
116-
$$unsetOrMatches: false
114+
upsert: { $$unsetOrMatches: false }
117115
outcome: *outcome

0 commit comments

Comments
 (0)