fix super admin
This commit is contained in:
@@ -56,6 +56,17 @@ describe('findTenantForHost', () => {
|
||||
expect(scoreTenantHost(mine, api)).toBe(75);
|
||||
});
|
||||
|
||||
it('full match uses extra IP aliases like get_user', () => {
|
||||
const tenant = fromDomain('k.montzar.ir', {
|
||||
domains: ['192.168.70.191', '192.168.70.184', '192.168.70.158'],
|
||||
});
|
||||
|
||||
expect(findTenantForHost([tenant], '192.168.70.191')?.domain).toBe(
|
||||
'k.montzar.ir',
|
||||
);
|
||||
expect(scoreTenantHost(tenant, '192.168.70.191')).toBe(90);
|
||||
});
|
||||
|
||||
it('does not pick a tenant when only a shared nodeServer matches', () => {
|
||||
const api = 'box.example.ir';
|
||||
const left = fromDomain('a.ir', { nodeServer: `https://${api}/server` });
|
||||
|
||||
Reference in New Issue
Block a user