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

@@ -689,7 +689,7 @@ async function upsertDnsRecords(domain, mailFqdn) {
const mailDomain = await getDomain(domain);
if (!mailDomain) throw new BoxError(BoxError.NOT_FOUND, 'mail domain not found');
if (process.env.BOX_ENV === 'test') return;
if (constants.TEST) return;
const publicKey = mailDomain.dkimKey.publicKey.split('\n').slice(1, -2).join(''); // remove header, footer and new lines