jstests/libs/override_methods/inject_tenant_prefix.js
/**
 * Removes all occurrences of a tenant prefix in the provided string.
 */
Removes all occurrences of a tenant prefix in the provided string.
Removes all occurrences of a tenant prefix in the provided string .
function removeTenantIdFromString(string) {
    if (isShardSplitPassthrough()) {
        const anyTenantPrefixGlobalRegex =
            new RegExp(Object.values(kTenantPrefixMap).join('|'), 'g');
        return string.replace(anyTenantPrefixGlobalRegex, "");
    }
    return string.replace(new RegExp(`${TestData.tenantId}_`, 'g'), "");
}
function removeTenantIdFromString ( string ) { if ( isShardSplitPassthrough ( ) ) { const anyTenantPrefixGlobalRegex = new RegExp ( Object . values ( kTenantPrefixMap ) . join ( '|' ) , 'g' ) ; return string . replace ( anyTenantPrefixGlobalRegex , "" ) ; } return string . replace ( new RegExp ( ` ${ TestData . tenantId } ` , 'g' ) , "" ) ; }
Removes all occurrences of a tenant prefix in the provided string.
Removes all occurrences of a tenant prefix in the provided string .