Browse Source

Make test-dns.js use dns_cares.

v0.7.4-release
Krishna Rajendran 15 years ago
committed by Ryan Dahl
parent
commit
96df65e88e
  1. 9
      test/disabled/test-dns.js

9
test/disabled/test-dns.js

@ -1,6 +1,7 @@
require("../common"); require("../common");
var dns = require("dns"), var dns = require("dns_cares"),
child_process = require("child_process"),
sys = require("sys"); sys = require("sys");
@ -20,7 +21,7 @@ var hosts = ['example.com', 'example.org',
'_xmpp-client._tcp.google.com', // SRV '_xmpp-client._tcp.google.com', // SRV
'oakalynhall.co.uk']; // Multiple PTR replies 'oakalynhall.co.uk']; // Multiple PTR replies
var records = ['A', 'AAAA', 'MX', 'TXT', 'SRV']; var records = ['A', 'AAAA', 'TXT', 'SRV'];
var i = hosts.length; var i = hosts.length;
while (i--) { while (i--) {
@ -32,7 +33,7 @@ while (i--) {
"| sed -E 's/[[:space:]]+/ /g' | cut -d ' ' -f 5- " + "| sed -E 's/[[:space:]]+/ /g' | cut -d ' ' -f 5- " +
"| sed -e 's/\\.$//'"; "| sed -e 's/\\.$//'";
sys.exec(hostCmd, checkDnsRecord(hosts[i], records[j])); child_process.exec(hostCmd, checkDnsRecord(hosts[i], records[j]));
} }
} }
@ -61,7 +62,7 @@ function checkDnsRecord(host, record) {
"| cut -d \" \" -f 5-" + "| cut -d \" \" -f 5-" +
"| sed -e 's/\\.$//'"; "| sed -e 's/\\.$//'";
sys.exec(reverseCmd, checkReverse(ip)); child_process.exec(reverseCmd, checkReverse(ip));
} }
}); });
break; break;

Loading…
Cancel
Save