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: #48265
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
LiviaMedeiros authored Jun 7, 2023
1 parent 1d1685e commit 9c5efdd
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 9c5efdd

Please sign in to comment.