Use constants.TEST

This commit is contained in:
Girish Ramakrishnan
2023-10-01 13:52:19 +05:30
parent 0e195679bf
commit ceb908bee7
20 changed files with 26 additions and 23 deletions

View File

@@ -261,7 +261,7 @@ async function verifyDomainConfig(domainObject) {
defaultProxyStatus: domainConfig.defaultProxyStatus
};
if (process.env.BOX_ENV === 'test') return sanitizedConfig; // this shouldn't be here
if (constants.TEST) return sanitizedConfig; // this shouldn't be here
const [error, nameservers] = await safe(dig.resolve(zoneName, 'NS', { timeout: 5000 }));
if (error && error.code === 'ENOTFOUND') throw new BoxError(BoxError.BAD_FIELD, 'Unable to resolve nameservers for this domain');