Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Fix test-c-ares.js on Windows by disabling PTR test
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Oct 18, 2011
1 parent 6cc0c9e commit d9bc845
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/simple/test-c-ares.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ dns.lookup('ipv6.google.com', function(error, result, addressType) {
assert.equal(6, addressType);
});

dns.resolve('127.0.0.1', 'PTR', function(error, domains) {
if (error) throw error;
assert.ok(Array.isArray(domains));
});

// Windows doesn't usually have an entry for localhost 127.0.0.1 in
// C:\Windows\System32\drivers\etc\hosts
// so we disable this test on Windows.
if (process.platform != 'win32') {
dns.resolve('127.0.0.1', 'PTR', function(error, domains) {
if (error) throw error;
assert.ok(Array.isArray(domains));
});
}

0 comments on commit d9bc845

Please sign in to comment.