diff options
author | Tuğrul Topuz <tugrultopuz@gmail.com> | 2013-10-21 16:47:57 +0300 |
---|---|---|
committer | Timothy J Fontaine <tjfontaine@gmail.com> | 2013-12-31 14:30:40 -0800 |
commit | bddea032b7f2b0f2854faa18855249286bd99428 (patch) | |
tree | 09d538558d9c670f7c34ced6407e08efe85179fc /test/internet/test-dns.js | |
parent | 13de0f1d278a49b2bafac6471bec6c14c3c9376b (diff) | |
download | nodejs-bddea032b7f2b0f2854faa18855249286bd99428.tar.gz nodejs-bddea032b7f2b0f2854faa18855249286bd99428.tar.bz2 nodejs-bddea032b7f2b0f2854faa18855249286bd99428.zip |
dns: add resolveSoa and 'SOA' rrtype
You can now query for SOA records by either passing 'SOA' to `resolve`
or by using the new `resolveSoa`
Diffstat (limited to 'test/internet/test-dns.js')
-rw-r--r-- | test/internet/test-dns.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/internet/test-dns.js b/test/internet/test-dns.js index cc69106c5..bb55aeca6 100644 --- a/test/internet/test-dns.js +++ b/test/internet/test-dns.js @@ -244,6 +244,40 @@ TEST(function test_resolveNaptr(done) { checkWrap(req); }); +TEST(function test_resolveSoa(done) { + var req = dns.resolveSoa('nodejs.org', function(err, result) { + if (err) throw err; + + assert.ok(result); + assert.ok(typeof result === 'object'); + + assert.ok(typeof result.nsname === 'string'); + assert.ok(result.nsname.length > 0); + + assert.ok(typeof result.hostmaster === 'string'); + assert.ok(result.hostmaster.length > 0); + + assert.ok(typeof result.serial === 'number'); + assert.ok((result.serial > 0) && (result.serial < 4294967295)); + + assert.ok(typeof result.refresh === 'number'); + assert.ok((result.refresh > 0) && (result.refresh < 2147483647)); + + assert.ok(typeof result.retry === 'number'); + assert.ok((result.retry > 0) && (result.retry < 2147483647)); + + assert.ok(typeof result.expire === 'number'); + assert.ok((result.expire > 0) && (result.expire < 2147483647)); + + assert.ok(typeof result.minttl === 'number'); + assert.ok((result.minttl >= 0) && (result.minttl < 2147483647)); + + done(); + }); + + checkWrap(req); +}); + TEST(function test_resolveCname(done) { var req = dns.resolveCname('www.microsoft.com', function(err, names) { if (err) throw err; |