Skip to content

Commit 1398829

Browse files
LiviaMedeirosRafaelGSS
authored andcommitted
test: fix test-net-autoselectfamily for kernel without IPv6 support
PR-URL: #48265 Reviewed-By: Luigi Pinca <[email protected]>
1 parent 4132931 commit 1398829

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/parallel/test-net-autoselectfamily-commandline-option.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ function createDnsServer(ipv6Addr, ipv4Addr, cb) {
8585
if (common.hasIPv6) {
8686
assert.strictEqual(error.code, 'ECONNREFUSED');
8787
assert.strictEqual(error.message, `connect ECONNREFUSED ::1:${port}`);
88+
} else if (error.code === 'EAFNOSUPPORT') {
89+
assert.strictEqual(error.message, `connect EAFNOSUPPORT ::1:${port} - Local (undefined:undefined)`);
8890
} else {
8991
assert.strictEqual(error.code, 'EADDRNOTAVAIL');
9092
assert.strictEqual(error.message, `connect EADDRNOTAVAIL ::1:${port} - Local (:::0)`);

0 commit comments

Comments
 (0)