jstests/replsets/tenant_migration_buildindex.js
// Attempts to create an index on a collection and checks that it succeeds
Attempts to create an index on a collection and checks that it succeeds
Attempts to create an index on a collection and checks that it succeeds
function createIndex(primaryHost, dbName, collName, indexSpec) {
    const donorPrimary = new Mongo(primaryHost);
    const db = donorPrimary.getDB(dbName);
    assert.commandWorked(db[collName].createIndex(indexSpec));
}
function createIndex ( primaryHost , dbName , collName , indexSpec ) { const donorPrimary = new Mongo ( primaryHost ) ; const db = donorPrimary . getDB ( dbName ) ; assert . commandWorked ( db [ collName ] . createIndex ( indexSpec ) ) ; }
Attempts to create an index on a collection and checks that it succeeds
Attempts to create an index on a collection and checks that it succeeds