Skip to content

Commit 170ceac

Browse files
committed
Keep 'em IPv6 fixes coming...
1 parent a3b3633 commit 170ceac

8 files changed

+12
-9
lines changed

test/parallel/test-http2-connect-options.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const assert = require('assert');
1212

1313
const server = http2.createServer((req, res) => {
1414
console.log(`Connect from: ${req.connection.remoteAddress}`);
15-
assert.strictEqual(req.connection.remoteAddress, 'localhost');
15+
assert.match(req.connection.remoteAddress, /^(127\.0\.0\.1|::1)$/);
1616

1717
req.on('end', common.mustCall(() => {
1818
res.writeHead(200, { 'Content-Type': 'text/plain' });
@@ -22,10 +22,10 @@ const server = http2.createServer((req, res) => {
2222
});
2323

2424
server.listen(0, 'localhost', common.mustCall(() => {
25-
const options = { localAddress: 'localhost' };
25+
const options = { localAddress: '::1' };
2626

2727
const client = http2.connect(
28-
'http://[::1]:' + server.address().port,
28+
'http://localhost:' + server.address().port,
2929
options
3030
);
3131
const req = client.request({

test/parallel/test-inspector-wait-for-connection.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ const assert = require('assert');
77
const { NodeInstance } = require('../common/inspector-helper.js');
88

99
async function runTests() {
10-
const child = new NodeInstance(['-e', `(${main.toString()})()`], '', '');
10+
const child = new NodeInstance(['--incpsect=localhost',
11+
'-e', `(${main.toString()})()`], '', '');
1112
const session = await child.connectInspectorSession();
1213
await session.send({ method: 'Runtime.enable' });
1314
// Check that there is only one console message received.

test/parallel/test-net-dns-lookup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ server.listen(0, 'localhost', common.mustCall(function() {
3333
net.connect(this.address().port, 'localhost')
3434
.on('lookup', common.mustCall(function(err, ip, type, host) {
3535
assert.strictEqual(err, null);
36-
assert.match(e.address, /^127\.0\.0\.1$|^::1$/); // eslint-disable-line
36+
assert.match(ip, /^127\.0\.0\.1$|^::1$/); // eslint-disable-line
3737
assert.strictEqual(type, 4);
3838
assert.strictEqual(host, 'localhost');
3939
}));

test/parallel/test-net-remote-address-port.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ let conns_closed = 0;
2929

3030
const remoteAddrCandidates = [ common.localhostIPv4 ];
3131
if (common.hasIPv6) remoteAddrCandidates.push('::ffff:127.0.0.1');
32+
if (common.hasIPv6) remoteAddrCandidates.push('::1');
3233

3334
const remoteFamilyCandidates = ['IPv4'];
3435
if (common.hasIPv6) remoteFamilyCandidates.push('IPv6');

test/parallel/test-tcp-wrap-listen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const {
1414

1515
const server = new TCP(TCPConstants.SOCKET);
1616

17-
const r = server.bind('::1', 0);
17+
const r = server.bind('::', 0);
1818
assert.strictEqual(r, 0);
1919
let port = {};
2020
server.getsockname(port);

test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const server = net.createServer(function onClient(client) {
2828
}
2929
});
3030

31-
server.listen(0, common.localhostIPv4, common.mustCall(() => {
31+
server.listen(0, 'localhost', common.mustCall(() => {
3232
const countdown = new Countdown(2, () => server.close());
3333

3434
{

test/parallel/test-tls-client-mindhsize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function test(size, err, next) {
3434
if (next) next();
3535
});
3636

37-
server.listen(0, '127.0.0.1', function() {
37+
server.listen(0, 'localhost', function() {
3838
// Client set minimum DH parameter size to 2048 bits so that
3939
// it fails when it make a connection to the tls server where
4040
// dhparams is 1024 bits

test/sequential/test-inspector-debug-brk-flag.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ async function testBreakpointOnStart(session) {
2727
}
2828

2929
async function runTests() {
30-
const child = new NodeInstance(['--inspect', '--inspect-brk']);
30+
const child = new NodeInstance(['--inspect=localhost',
31+
'--inspect-brk=localhost']);
3132
const session = await child.connectInspectorSession();
3233

3334
await testBreakpointOnStart(session);

0 commit comments

Comments
 (0)