Fix failing tests

This commit is contained in:
Girish Ramakrishnan
2017-01-10 16:44:28 -08:00
parent b929adf2dd
commit 3176bc1afa
6 changed files with 14 additions and 8 deletions
+2
View File
@@ -226,6 +226,8 @@ function verifyDnsConfig(dnsConfig, domain, ip, callback) {
endpoint: dnsConfig.endpoint || null
};
if (process.env.BOX_ENV === 'test') return callback(null, credentials); // this shouldn't be here
dns.resolveNs(domain, function (error, nameservers) {
if (error && error.code === 'ENOTFOUND') return callback(new SubdomainError(SubdomainError.BAD_FIELD, 'Unable to resolve nameservers for this domain'));
if (error || !nameservers) return callback(new SubdomainError(SubdomainError.BAD_FIELD, error ? error.message : 'Unable to get nameservers'));