From 3c5dde6dcf2ed5b2a53a9298eb6ab86ba5e863d9 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Mon, 17 Jul 2023 13:07:14 -0400 Subject: [PATCH] PHPLIB-1205: Sync runCommand spec tests for removal of "sharded-replicaset" Synced with mongodb/specifications@9d7ceed8c37bafb5769787c26c8f8c79670f94f8 Includes some changes from pending runCursorCommand spec work (PHPLIB-1077). --- .../run-command/runCommand.json | 71 +++++++++++++++++-- 1 file changed, 66 insertions(+), 5 deletions(-) diff --git a/tests/UnifiedSpecTests/run-command/runCommand.json b/tests/UnifiedSpecTests/run-command/runCommand.json index 9c7f912f9..fde9de92e 100644 --- a/tests/UnifiedSpecTests/run-command/runCommand.json +++ b/tests/UnifiedSpecTests/run-command/runCommand.json @@ -123,6 +123,68 @@ } ] }, + { + "description": "always gossips the $clusterTime on the sent command", + "runOnRequirements": [ + { + "topologies": [ + "replicaset", + "sharded" + ] + } + ], + "operations": [ + { + "name": "runCommand", + "object": "db", + "arguments": { + "commandName": "ping", + "command": { + "ping": 1 + } + }, + "expectResult": { + "ok": 1 + } + }, + { + "name": "runCommand", + "object": "db", + "arguments": { + "commandName": "ping", + "command": { + "ping": 1 + } + }, + "expectResult": { + "ok": 1 + } + } + ], + "expectEvents": [ + { + "client": "client", + "events": [ + { + "commandStartedEvent": { + "commandName": "ping" + } + }, + { + "commandStartedEvent": { + "command": { + "ping": 1, + "$clusterTime": { + "$$exists": true + } + }, + "commandName": "ping" + } + } + ] + } + ] + }, { "description": "attaches the provided session lsid to given command", "operations": [ @@ -167,7 +229,6 @@ { "topologies": [ "replicaset", - "sharded-replicaset", "load-balanced", "sharded" ] @@ -346,7 +407,7 @@ "insert": "collection", "documents": [ { - "_id": 1 + "foo": "bar" } ], "ordered": true @@ -431,7 +492,7 @@ { "minServerVersion": "4.2", "topologies": [ - "sharded-replicaset", + "sharded", "load-balanced" ] } @@ -452,7 +513,7 @@ "insert": "collection", "documents": [ { - "_id": 2 + "foo": "transaction" } ], "ordered": true @@ -480,7 +541,7 @@ "insert": "collection", "documents": [ { - "_id": 2 + "foo": "transaction" } ], "ordered": true,