Skip to content

Commit

Permalink
test: fix test-net-autoselectfamily for kernel without IPv6 support
Browse files Browse the repository at this point in the history
PR-URL: nodejs#48265
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
LiviaMedeiros authored and pull[bot] committed Aug 23, 2023
1 parent 2d3ee2f commit ddb5c2d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/parallel/test-net-autoselectfamily-commandline-option.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ function createDnsServer(ipv6Addr, ipv4Addr, cb) {
if (common.hasIPv6) {
assert.strictEqual(error.code, 'ECONNREFUSED');
assert.strictEqual(error.message, `connect ECONNREFUSED ::1:${port}`);
} else if (error.code === 'EAFNOSUPPORT') {
assert.strictEqual(error.message, `connect EAFNOSUPPORT ::1:${port} - Local (undefined:undefined)`);
} else {
assert.strictEqual(error.code, 'EADDRNOTAVAIL');
assert.strictEqual(error.message, `connect EADDRNOTAVAIL ::1:${port} - Local (:::0)`);
Expand Down

0 comments on commit ddb5c2d

Please sign in to comment.