test: fix up internet/test-dns after api change
* The test calls an internal API that changed in commit ca9eb71. * Trying to reverse-lookup a bogus hostname now returns EINVAL rather than the (bogus!) status code ENOTIMP.
This commit is contained in:
parent
2b5b37a3ab
commit
4ffa943c3f
@ -145,7 +145,7 @@ TEST(function test_reverse_bogus(done) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assert.ok(error instanceof Error);
|
assert.ok(error instanceof Error);
|
||||||
assert.strictEqual(error.errno, 'ENOTIMP');
|
assert.strictEqual(error.errno, 'EINVAL');
|
||||||
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@ -410,9 +410,12 @@ TEST(function test_lookup_localhost_ipv4(done) {
|
|||||||
var getaddrinfoCallbackCalled = false;
|
var getaddrinfoCallbackCalled = false;
|
||||||
|
|
||||||
console.log('looking up nodejs.org...');
|
console.log('looking up nodejs.org...');
|
||||||
var req = process.binding('cares_wrap').getaddrinfo('nodejs.org');
|
|
||||||
|
|
||||||
req.oncomplete = function(domains) {
|
var req = {};
|
||||||
|
var err = process.binding('cares_wrap').getaddrinfo(req, 'nodejs.org', 4);
|
||||||
|
|
||||||
|
req.oncomplete = function(err, domains) {
|
||||||
|
assert.strictEqual(err, 0);
|
||||||
console.log('nodejs.org = ', domains);
|
console.log('nodejs.org = ', domains);
|
||||||
assert.ok(Array.isArray(domains));
|
assert.ok(Array.isArray(domains));
|
||||||
assert.ok(domains.length >= 1);
|
assert.ok(domains.length >= 1);
|
||||||
@ -420,8 +423,6 @@ req.oncomplete = function(domains) {
|
|||||||
getaddrinfoCallbackCalled = true;
|
getaddrinfoCallbackCalled = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
process.on('exit', function() {
|
process.on('exit', function() {
|
||||||
console.log(completed + ' tests completed');
|
console.log(completed + ' tests completed');
|
||||||
assert.equal(running, false);
|
assert.equal(running, false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user