Skip to content

Commit 38f6ad4

Browse files
authored
PHPLIB-1205: Sync runCommand spec tests for removal of "sharded-replicaset" (#1134)
Synced with mongodb/specifications@9d7ceed Includes some changes from pending runCursorCommand spec work (PHPLIB-1077).
1 parent 0c1b8a6 commit 38f6ad4

File tree

1 file changed

+66
-5
lines changed

1 file changed

+66
-5
lines changed

tests/UnifiedSpecTests/run-command/runCommand.json

Lines changed: 66 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,68 @@
123123
}
124124
]
125125
},
126+
{
127+
"description": "always gossips the $clusterTime on the sent command",
128+
"runOnRequirements": [
129+
{
130+
"topologies": [
131+
"replicaset",
132+
"sharded"
133+
]
134+
}
135+
],
136+
"operations": [
137+
{
138+
"name": "runCommand",
139+
"object": "db",
140+
"arguments": {
141+
"commandName": "ping",
142+
"command": {
143+
"ping": 1
144+
}
145+
},
146+
"expectResult": {
147+
"ok": 1
148+
}
149+
},
150+
{
151+
"name": "runCommand",
152+
"object": "db",
153+
"arguments": {
154+
"commandName": "ping",
155+
"command": {
156+
"ping": 1
157+
}
158+
},
159+
"expectResult": {
160+
"ok": 1
161+
}
162+
}
163+
],
164+
"expectEvents": [
165+
{
166+
"client": "client",
167+
"events": [
168+
{
169+
"commandStartedEvent": {
170+
"commandName": "ping"
171+
}
172+
},
173+
{
174+
"commandStartedEvent": {
175+
"command": {
176+
"ping": 1,
177+
"$clusterTime": {
178+
"$$exists": true
179+
}
180+
},
181+
"commandName": "ping"
182+
}
183+
}
184+
]
185+
}
186+
]
187+
},
126188
{
127189
"description": "attaches the provided session lsid to given command",
128190
"operations": [
@@ -167,7 +229,6 @@
167229
{
168230
"topologies": [
169231
"replicaset",
170-
"sharded-replicaset",
171232
"load-balanced",
172233
"sharded"
173234
]
@@ -346,7 +407,7 @@
346407
"insert": "collection",
347408
"documents": [
348409
{
349-
"_id": 1
410+
"foo": "bar"
350411
}
351412
],
352413
"ordered": true
@@ -431,7 +492,7 @@
431492
{
432493
"minServerVersion": "4.2",
433494
"topologies": [
434-
"sharded-replicaset",
495+
"sharded",
435496
"load-balanced"
436497
]
437498
}
@@ -452,7 +513,7 @@
452513
"insert": "collection",
453514
"documents": [
454515
{
455-
"_id": 2
516+
"foo": "transaction"
456517
}
457518
],
458519
"ordered": true
@@ -480,7 +541,7 @@
480541
"insert": "collection",
481542
"documents": [
482543
{
483-
"_id": 2
544+
"foo": "transaction"
484545
}
485546
],
486547
"ordered": true,

0 commit comments

Comments
 (0)