jstests/serverless/serverlesstest.js
/**
     * Helper method for setting primary shard of a database and making sure that it was
     * successful. Note: first mongoq needs to be up.
     */
Helper method for setting primary shard of a database and making sure that it was
successful. Note: first mongoq needs to be up.
Helper method for setting primary shard of a database and making sure that it was successful . Note : first mongoq needs to be up .
ensurePrimaryShard(dbName, shardName) {
        var db = this.q.getDB('admin');
        var res = db.adminCommand({movePrimary: dbName, to: shardName});
        assert(res.ok || res.errmsg == "it is already the primary", tojson(res));
    }
ensurePrimaryShard ( dbName , shardName ) { var db = this . q . getDB ( 'admin' ) ; var res = db . adminCommand ( { movePrimary : dbName , to : shardName } ) ; assert ( res . ok || res . errmsg == "it is already the primary" , tojson ( res ) ) ; }
Helper method for setting primary shard of a database and making sure that it was
 successful.
Helper method for setting primary shard of a database and making sure that it was successful .