summaryrefslogtreecommitdiff
path: root/jstests/sharding/updateOne_without_shard_key/cluster_query_without_shard_key_basic.js
blob: 90d748ad2254acd04a23829b5200724ed0444c3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
 * Tests the internal command _clusterQueryWithoutShardKey.
 *
 * @tags: [requires_fcv_62, featureFlagUpdateOneWithoutShardKey]
 */
(function() {
"use strict";

let st = new ShardingTest({shards: 1, rs: {nodes: 1}});
let dbName = "test";
let mongosConn = st.s.getDB(dbName);
let shardConn = st.shard0.getDB(dbName);
let cmdObj = {_clusterQueryWithoutShardKey: 1, writeCmd: {}, stmtId: NumberInt(1)};

assert.commandWorked(mongosConn.runCommand(cmdObj));
assert.commandFailedWithCode(shardConn.runCommand(cmdObj), ErrorCodes.CommandNotFound);

st.stop();
})();