jstests/replsets/tenant_migration_donor_rollback_during_cloning.js
// The database that failed to replicate on the donor RST must not exist on the recipient.
The database that failed to replicate on the donor RST must not exist on the recipient.
The database that failed to replicate on the donor RST must not exist on the recipient .
function listDatabasesPostMigrationFunction(tenantId, tenantMigrationTest) {
    const recipientPrimary = tenantMigrationTest.getRecipientPrimary();
    const dbNames = recipientPrimary.adminCommand(
        {listDatabases: 1, nameOnly: true, filter: {"name": new RegExp("^" + tenantId)}});
    assert.eq(1, dbNames.databases.length, dbNames);
    assert.eq(dbNames.databases[0].name, tenantMigrationTest.tenantDB(tenantId, "testDB"), dbNames);
}
function listDatabasesPostMigrationFunction ( tenantId , tenantMigrationTest ) { const recipientPrimary = tenantMigrationTest . getRecipientPrimary ( ) ; const dbNames = recipientPrimary . adminCommand ( { listDatabases : 1 , nameOnly : true , filter : { "name" : new RegExp ( "^" + tenantId ) } } ) ; assert . eq ( 1 , dbNames . databases . length , dbNames ) ; assert . eq ( dbNames . databases [ 0 ] . name , tenantMigrationTest . tenantDB ( tenantId , "testDB" ) , dbNames ) ; }
The database that failed to replicate on the donor RST must not exist on the recipient.
The database that failed to replicate on the donor RST must not exist on the recipient .
// Get all databases corresponding to the given tenant.