mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
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/2468
This commit is contained in:
1 parent
1d75012b9d
commit
779e14f1a7
1 file changed
+13
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user