Skip to content

Commit

Permalink
test: apply Linux workaround to Linux only
Browse files Browse the repository at this point in the history
Do not try Ubuntu/SUSE/Debian-specific hostnames for IPv6 localhost
unless we are on Linux.

Fixes: nodejs#4546
  • Loading branch information
Trott committed Feb 28, 2016
1 parent ffdc046 commit 644f9aa
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,21 @@ var opensslCli = null;
var inFreeBSDJail = null;
var localhostIPv4 = null;

exports.localIPv6Hosts = [
// Debian/Ubuntu
'ip6-localhost',
'ip6-loopback',

// SUSE
'ipv6-localhost',
'ipv6-loopback',

// Typically universal
'localhost',
];
exports.localIPv6Hosts = ['localhost'];
if (process.platform === 'linux') {
exports.localIPv6Hosts = [
// Debian/Ubuntu
'ip6-localhost',
'ip6-loopback',

// SUSE
'ipv6-localhost',
'ipv6-loopback',

// Typically universal
'localhost',
];
}

Object.defineProperty(exports, 'inFreeBSDJail', {
get: function() {
Expand Down

0 comments on commit 644f9aa

Please sign in to comment.