Skip to content

Commit e6d93bb

Browse files
committed
Draft: more IPv6 fixes
1 parent e4d93b4 commit e6d93bb

14 files changed

+15
-15
lines changed

test/common/inspector-helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ class NodeInstance extends EventEmitter {
364364

365365
static async startViaSignal(scriptContents) {
366366
const instance = new NodeInstance(
367-
['--expose-internals'],
367+
['--inspect=localhost', '--expose-internals'],
368368
`${scriptContents}\nprocess._rawDebug('started');`, undefined);
369369
const msg = 'Timed out waiting for process to start';
370370
while (await fires(instance.nextStderrString(), msg, TIMEOUT) !==

test/parallel/test-http-localaddress.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ server.listen(0, 'localhost', () => {
4444
port: server.address().port,
4545
path: '/',
4646
method: 'GET',
47-
localAddress: 'localhost' };
47+
localAddress: '::1' };
4848

4949
const req = http.request(options, function(res) {
5050
res.on('end', () => {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ server.listen(0, 'localhost', common.mustCall(() => {
2525
const options = { localAddress: 'localhost' };
2626

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

test/parallel/test-https-localaddress.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ server.listen(0, 'localhost', function() {
5454
port: this.address().port,
5555
path: '/',
5656
method: 'GET',
57-
localAddress: 'localhost',
57+
localAddress: '::1',
5858
rejectUnauthorized: false
5959
};
6060

test/parallel/test-inspect-async-hook-setup-at-inspect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async function checkAsyncStackTrace(session) {
4545
}
4646

4747
async function runTests() {
48-
const instance = new NodeInstance(['--inspect=::1'], script);
48+
const instance = new NodeInstance(['--inspect=localhost'], script);
4949
const session = await instance.connectInspectorSession();
5050
await session.send([
5151
{ 'method': 'Runtime.enable' },

test/parallel/test-inspect-publish-uid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async function testArg(argValue) {
1818
const hasStderr = argValue.split(',').includes('stderr');
1919

2020
const nodeProcess = spawnSync(process.execPath, [
21-
'--inspect=0',
21+
'--inspect=localhost:0',
2222
`--inspect-publish-uid=${argValue}`,
2323
'-e', `(${scriptMain.toString()})(${hasHttp ? 200 : 404})`
2424
]);

test/parallel/test-inspector-waiting-for-disconnect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function mainContextDestroyed(notification) {
1212
}
1313

1414
async function runTest() {
15-
const child = new NodeInstance(['--inspect-brk=0', '-e', 'process.exit(55)']);
15+
const child = new NodeInstance(['--inspect-brk=localhost:0', '-e', 'process.exit(55)']);
1616
const session = await child.connectInspectorSession();
1717
const oldStyleSession = await child.connectInspectorSession();
1818
await oldStyleSession.send([

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function makeConnection() {
1414
const client = new TCP(TCPConstants.SOCKET);
1515

1616
const req = new TCPConnectWrap();
17-
const err = client.connect(req, '127.0.0.1', this.address().port);
17+
const err = client.connect(req, '::1', this.address().port);
1818
assert.strictEqual(err, 0);
1919

2020
req.oncomplete = function(status, client_, req_, readable, writable) {

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('0.0.0.0', 0);
17+
const r = server.bind('::1', 0);
1818
assert.strictEqual(r, 0);
1919
let port = {};
2020
server.getsockname(port);

test/sequential/test-https-connect-localport.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ const assert = require('assert');
1717
res.end();
1818
}));
1919

20-
server.listen(0, 'localhost', common.mustCall(() => {
20+
server.listen(0, '::1', common.mustCall(() => {
2121
const port = server.address().port;
2222
const req = https.get({
23-
host: 'localhost',
23+
host: '::1',
2424
pathname: '/',
2525
port,
2626
family: 4,

0 commit comments

Comments
 (0)