jstests/sharding/libs/zone_changes_util.js
/**
 * Asserts that the given shards have the given tags.
 *
 * @param shardTags {Object} a map from each shard name to an array of strings representing the zone
 *                           names that the shard owns.
 */
Asserts that the given shards have the given tags.
@param shardTags {Object} a map from each shard name to an array of strings representing the zone
names that the shard owns.
Asserts that the given shards have the given tags . @param shardTags { Object } a map from each shard name to an array of strings representing the zone names that the shard owns .
function assertShardTags(configDB, shardTags) {
    for (let [shardName, tags] of Object.entries(shardTags)) {
        assert.eq(tags.sort(),
                  configDB.shards.findOne({_id: shardName}).tags.sort(),
                  "expected shard \"" + shardName + "\" to have tags " + tojson(tags.sort()));
    }
}
function assertShardTags ( configDB , shardTags ) { for ( let [ shardName , tags ] of Object . entries ( shardTags ) ) { assert . eq ( tags . sort ( ) , configDB . shards . findOne ( { _id : shardName } ) . tags . sort ( ) , "expected shard \"" + shardName + "\" to have tags " + tojson ( tags . sort ( ) ) ) ; } }
Asserts that the given shards have the given tags.
Asserts that the given shards have the given tags .