|
1 | 1 | {
|
2 |
| - "description": "runCommand spec requirements", |
3 |
| - "schemaVersion": "1.5", |
| 2 | + "description": "runCommand", |
| 3 | + "schemaVersion": "1.3", |
4 | 4 | "createEntities": [
|
5 | 5 | {
|
6 | 6 | "client": {
|
7 | 7 | "id": "client",
|
| 8 | + "useMultipleMongoses": false, |
8 | 9 | "observeEvents": [
|
9 | 10 | "commandStartedEvent"
|
10 | 11 | ]
|
11 | 12 | }
|
12 | 13 | },
|
13 | 14 | {
|
14 | 15 | "database": {
|
15 |
| - "id": "plainDb", |
| 16 | + "id": "db", |
16 | 17 | "client": "client",
|
17 |
| - "databaseName": "plainDb" |
| 18 | + "databaseName": "db" |
18 | 19 | }
|
19 | 20 | },
|
20 | 21 | {
|
21 | 22 | "collection": {
|
22 | 23 | "id": "collection",
|
23 |
| - "database": "plainDb", |
| 24 | + "database": "db", |
24 | 25 | "collectionName": "collection"
|
25 | 26 | }
|
26 | 27 | },
|
|
56 | 57 | },
|
57 | 58 | {
|
58 | 59 | "client": {
|
59 |
| - "id": "stableApiClient", |
| 60 | + "id": "clientWithStableApi", |
60 | 61 | "observeEvents": [
|
61 | 62 | "commandStartedEvent"
|
62 | 63 | ],
|
|
68 | 69 | },
|
69 | 70 | {
|
70 | 71 | "database": {
|
71 |
| - "id": "stableApiDb", |
72 |
| - "client": "stableApiClient", |
73 |
| - "databaseName": "stableApiDb" |
| 72 | + "id": "dbWithStableApi", |
| 73 | + "client": "clientWithStableApi", |
| 74 | + "databaseName": "dbWithStableApi" |
74 | 75 | }
|
75 | 76 | }
|
76 | 77 | ],
|
77 | 78 | "initialData": [
|
78 | 79 | {
|
79 | 80 | "collectionName": "collection",
|
80 |
| - "databaseName": "plainDb", |
81 |
| - "documents": [ |
82 |
| - { |
83 |
| - "_id": 0 |
84 |
| - } |
85 |
| - ] |
| 81 | + "databaseName": "db", |
| 82 | + "documents": [] |
86 | 83 | }
|
87 | 84 | ],
|
88 | 85 | "tests": [
|
|
91 | 88 | "operations": [
|
92 | 89 | {
|
93 | 90 | "name": "runCommand",
|
94 |
| - "object": "plainDb", |
| 91 | + "object": "db", |
95 | 92 | "arguments": {
|
96 | 93 | "commandName": "ping",
|
97 | 94 | "command": {
|
|
111 | 108 | "commandStartedEvent": {
|
112 | 109 | "command": {
|
113 | 110 | "ping": 1,
|
114 |
| - "$db": "plainDb" |
| 111 | + "$db": "db" |
115 | 112 | },
|
116 | 113 | "commandName": "ping"
|
117 | 114 | }
|
|
121 | 118 | ]
|
122 | 119 | },
|
123 | 120 | {
|
124 |
| - "description": "attaches the provided session lsid to ping command", |
| 121 | + "description": "attaches the provided session lsid to given command", |
125 | 122 | "operations": [
|
126 | 123 | {
|
127 | 124 | "name": "runCommand",
|
128 |
| - "object": "plainDb", |
| 125 | + "object": "db", |
129 | 126 | "arguments": {
|
130 | 127 | "commandName": "ping",
|
131 | 128 | "command": {
|
|
149 | 146 | "lsid": {
|
150 | 147 | "$$sessionLsid": "session"
|
151 | 148 | },
|
152 |
| - "$db": "plainDb" |
| 149 | + "$db": "db" |
153 | 150 | },
|
154 | 151 | "commandName": "ping"
|
155 | 152 | }
|
|
163 | 160 | "operations": [
|
164 | 161 | {
|
165 | 162 | "name": "runCommand",
|
166 |
| - "object": "plainDb", |
| 163 | + "object": "db", |
167 | 164 | "arguments": {
|
168 | 165 | "commandName": "ping",
|
169 | 166 | "command": {
|
170 | 167 | "ping": 1
|
171 | 168 | },
|
172 |
| - "readPreference": "nearest" |
| 169 | + "readPreference": { |
| 170 | + "mode": "nearest" |
| 171 | + } |
173 | 172 | },
|
174 | 173 | "expectResult": {
|
175 | 174 | "ok": 1
|
|
187 | 186 | "$readPreference": {
|
188 | 187 | "mode": "nearest"
|
189 | 188 | },
|
190 |
| - "$db": "plainDb" |
| 189 | + "$db": "db" |
191 | 190 | },
|
192 | 191 | "commandName": "ping"
|
193 | 192 | }
|
|
203 | 202 | "name": "runCommand",
|
204 | 203 | "object": "dbWithRC",
|
205 | 204 | "arguments": {
|
206 |
| - "commandName": "ping", |
| 205 | + "commandName": "aggregate", |
207 | 206 | "command": {
|
208 |
| - "ping": 1 |
| 207 | + "aggregate": 1, |
| 208 | + "pipeline": [] |
209 | 209 | }
|
210 |
| - }, |
211 |
| - "expectResult": { |
212 |
| - "ok": 1 |
213 | 210 | }
|
214 | 211 | }
|
215 | 212 | ],
|
|
226 | 223 | },
|
227 | 224 | "$db": "dbWithRC"
|
228 | 225 | },
|
229 |
| - "commandName": "ping" |
| 226 | + "commandName": "aggregate" |
230 | 227 | }
|
231 | 228 | }
|
232 | 229 | ]
|
|
240 | 237 | "name": "runCommand",
|
241 | 238 | "object": "dbWithWC",
|
242 | 239 | "arguments": {
|
243 |
| - "commandName": "ping", |
| 240 | + "commandName": "insert", |
244 | 241 | "command": {
|
245 |
| - "ping": 1 |
| 242 | + "insert": "collection", |
| 243 | + "documents": [ |
| 244 | + { |
| 245 | + "_id": 1 |
| 246 | + } |
| 247 | + ], |
| 248 | + "ordered": true |
246 | 249 | }
|
247 | 250 | },
|
248 | 251 | "expectResult": {
|
|
257 | 260 | {
|
258 | 261 | "commandStartedEvent": {
|
259 | 262 | "command": {
|
260 |
| - "ping": 1, |
| 263 | + "insert": "collection", |
261 | 264 | "writeConcern": {
|
262 | 265 | "$$exists": false
|
263 | 266 | },
|
|
294 | 297 | },
|
295 | 298 | {
|
296 | 299 | "name": "runCommand",
|
297 |
| - "object": "plainDb", |
| 300 | + "object": "db", |
298 | 301 | "arguments": {
|
299 | 302 | "commandName": "ping",
|
300 | 303 | "command": {
|
301 | 304 | "ping": 1
|
302 | 305 | }
|
303 | 306 | },
|
304 | 307 | "expectError": {
|
305 |
| - "isError": true |
| 308 | + "isClientError": true |
306 | 309 | }
|
307 | 310 | }
|
308 | 311 | ]
|
|
311 | 314 | "description": "attaches transaction fields to given command",
|
312 | 315 | "runOnRequirements": [
|
313 | 316 | {
|
| 317 | + "minServerVersion": "4.0", |
| 318 | + "topologies": [ |
| 319 | + "replicaset" |
| 320 | + ] |
| 321 | + }, |
| 322 | + { |
| 323 | + "minServerVersion": "4.2", |
314 | 324 | "topologies": [
|
315 |
| - "replicaset", |
316 | 325 | "sharded-replicaset",
|
317 |
| - "load-balanced", |
318 |
| - "sharded" |
319 |
| - ], |
320 |
| - "minServerVersion": "4.4" |
| 326 | + "load-balanced" |
| 327 | + ] |
321 | 328 | }
|
322 | 329 | ],
|
323 | 330 | "operations": [
|
|
328 | 335 | "callback": [
|
329 | 336 | {
|
330 | 337 | "name": "runCommand",
|
331 |
| - "object": "plainDb", |
| 338 | + "object": "db", |
332 | 339 | "arguments": {
|
333 | 340 | "session": "session",
|
334 | 341 | "commandName": "insert",
|
335 | 342 | "command": {
|
336 | 343 | "insert": "collection",
|
337 | 344 | "documents": [
|
338 | 345 | {
|
339 |
| - "_id": 1 |
| 346 | + "_id": 2 |
340 | 347 | }
|
341 | 348 | ],
|
342 | 349 | "ordered": true
|
|
364 | 371 | "insert": "collection",
|
365 | 372 | "documents": [
|
366 | 373 | {
|
367 |
| - "_id": 1 |
| 374 | + "_id": 2 |
368 | 375 | }
|
369 | 376 | ],
|
370 | 377 | "ordered": true,
|
|
382 | 389 | }
|
383 | 390 | },
|
384 | 391 | "commandName": "insert",
|
385 |
| - "databaseName": "plainDb" |
| 392 | + "databaseName": "db" |
386 | 393 | }
|
387 | 394 | },
|
388 | 395 | {
|
|
414 | 421 | "operations": [
|
415 | 422 | {
|
416 | 423 | "name": "runCommand",
|
417 |
| - "object": "stableApiDb", |
| 424 | + "object": "dbWithStableApi", |
418 | 425 | "arguments": {
|
419 | 426 | "commandName": "ping",
|
420 | 427 | "command": {
|
|
428 | 435 | ],
|
429 | 436 | "expectEvents": [
|
430 | 437 | {
|
431 |
| - "client": "stableApiClient", |
| 438 | + "client": "clientWithStableApi", |
432 | 439 | "events": [
|
433 | 440 | {
|
434 | 441 | "commandStartedEvent": {
|
435 | 442 | "command": {
|
436 | 443 | "ping": 1,
|
437 |
| - "$db": "stableApiDb", |
| 444 | + "$db": "dbWithStableApi", |
438 | 445 | "apiVersion": "1",
|
439 | 446 | "apiStrict": true,
|
440 | 447 | "apiDeprecationErrors": {
|
|
0 commit comments