Skip to content

Commit

Permalink
test: expect error for test_lookup_ipv6_hint on FreeBSD
Browse files Browse the repository at this point in the history
FreeBSD does not support the V4MAPPED flag so expect an error.

This is a partial fix for #2468.
It only fixes it on FreeBSD. Failures on other platforms are due to
other reasons and need to be fixed separately.

PR-URL: #2724
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
Fixes: #2468
  • Loading branch information
Trott authored and rvagg committed Sep 11, 2015
1 parent 1d75012 commit 779e14f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion test/internet/test-dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 779e14f

Please sign in to comment.