summaryrefslogtreecommitdiff
path: root/jstests/aggregation/sources/indexStats/verify_index_stats_output.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/aggregation/sources/indexStats/verify_index_stats_output.js')
-rw-r--r--jstests/aggregation/sources/indexStats/verify_index_stats_output.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/jstests/aggregation/sources/indexStats/verify_index_stats_output.js b/jstests/aggregation/sources/indexStats/verify_index_stats_output.js
index 0b2dbeba8f9..15cc007672d 100644
--- a/jstests/aggregation/sources/indexStats/verify_index_stats_output.js
+++ b/jstests/aggregation/sources/indexStats/verify_index_stats_output.js
@@ -69,6 +69,7 @@ let shardsFound = [];
db.getSiblingDB("config").shards.find().forEach(function(shard) {
allShards.push(shard._id);
});
+const isShardedCluster = !!allShards.length;
for (const indexStats of pausedOutput) {
assert.hasFields(indexStats, ["building", "spec"]);
@@ -84,6 +85,8 @@ for (const indexStats of pausedOutput) {
// names of known shards.
if (indexStats.hasOwnProperty("shard")) {
shardsFound.push(indexStats["shard"]);
+ } else {
+ assert(!isShardedCluster);
}
}