mirror of https://github.com/nodejs/node.git
test: expect error for test_lookup_ipv6_hint on FreeBSD
FreeBSD does not support the V4MAPPED flag so expect an error. This is a partial fix for https://github.com/nodejs/node/issues/2468. It only fixes it on FreeBSD. Failures on other platforms are due to other reasons and need to be fixed separately. PR-URL: https://github.com/nodejs/node/pull/2724 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Fixes: https://github.com/nodejs/node/issues/2468pull/2775/head
parent
380a3d89c3
commit
f8152df5e8
|
@ -394,7 +394,19 @@ TEST(function test_lookup_ipv6_hint(done) {
|
|||
family: 6,
|
||||
hints: dns.V4MAPPED
|
||||
}, function(err, ip, family) {
|
||||
if (err) throw err;
|
||||
if (err) {
|
||||
// FreeBSD does not support V4MAPPED
|
||||
if (process.platform === 'freebsd') {
|
||||
assert(err instanceof Error);
|
||||
assert.strictEqual(err.code, 'EAI_BADFLAGS');
|
||||
assert.strictEqual(err.hostname, 'www.google.com');
|
||||
assert.ok(/getaddrinfo EAI_BADFLAGS/.test(err.message));
|
||||
done();
|
||||
return;
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
assert.ok(net.isIPv6(ip));
|
||||
assert.strictEqual(family, 6);
|
||||
|
||||
|
|
Loading…
Reference in New Issue