jstests/libs/override_methods/inject_tenant_prefix.js
/**
 * Remove a tenant prefix from the provided database name, if applicable.
 */
Remove a tenant prefix from the provided database name, if applicable.
Remove a tenant prefix from the provided database name if applicable .
function extractOriginalDbName(dbName) {
    if (isShardSplitPassthrough()) {
        const anyTenantPrefixOnceRegex = new RegExp(Object.values(kTenantPrefixMap).join('|'), '');
        return dbName.replace(anyTenantPrefixOnceRegex, "");
    }
    return dbName.replace(`${TestData.tenantId}_`, "");
}
function extractOriginalDbName ( dbName ) { if ( isShardSplitPassthrough ( ) ) { const anyTenantPrefixOnceRegex = new RegExp ( Object . values ( kTenantPrefixMap ) . join ( '|' ) , '' ) ; return dbName . replace ( anyTenantPrefixOnceRegex , "" ) ; } return dbName . replace ( ` ${ TestData . tenantId } ` , "" ) ; }
Remove a tenant prefix from the provided database name, if applicable.
Remove a tenant prefix from the provided database name if applicable .