Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Commit 64995be

Browse files
committed
test: use --reuseaddr to fix git port conflicts
PR-URL: #10903 Credit: @zkat
1 parent 75ab216 commit 64995be

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

test/tap/add-remote-git-fake-windows.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var pjParent = JSON.stringify({
2020
name: 'parent',
2121
version: '1.2.3',
2222
dependencies: {
23-
child: 'git://localhost:1233/child.git'
23+
child: 'git://localhost:1234/child.git'
2424
}
2525
}, null, 2) + '\n'
2626

@@ -93,7 +93,8 @@ function setup (cb) {
9393
'--listen=localhost',
9494
'--export-all',
9595
'--base-path=.',
96-
'--port=1233'
96+
'--reuseaddr',
97+
'--port=1234'
9798
],
9899
{
99100
cwd: pkg,

test/tap/add-remote-git-shrinkwrap.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var pjParent = JSON.stringify({
2020
name: 'parent',
2121
version: '1.2.3',
2222
dependencies: {
23-
'child': 'git://localhost:1235/child.git#master'
23+
'child': 'git://localhost:1234/child.git#master'
2424
}
2525
}, null, 2) + '\n'
2626

@@ -68,7 +68,7 @@ test('shrinkwrap gets correct _from and _resolved (#7121)', function (t) {
6868
var shrinkwrap = require(resolve(pkg, 'npm-shrinkwrap.json'))
6969
t.equal(
7070
shrinkwrap.dependencies.child.from,
71-
'git://localhost:1235/child.git#master',
71+
'git://localhost:1234/child.git#master',
7272
'npm shrinkwrapped from correctly'
7373
)
7474

@@ -82,7 +82,7 @@ test('shrinkwrap gets correct _from and _resolved (#7121)', function (t) {
8282

8383
t.equal(
8484
shrinkwrap.dependencies.child.resolved,
85-
'git://localhost:1235/child.git#' + treeish,
85+
'git://localhost:1234/child.git#' + treeish,
8686
'npm shrinkwrapped resolved correctly'
8787
)
8888

@@ -121,7 +121,8 @@ function setup (cb) {
121121
'--listen=localhost',
122122
'--export-all',
123123
'--base-path=.',
124-
'--port=1235'
124+
'--reuseaddr',
125+
'--port=1234'
125126
],
126127
{
127128
cwd: pkg,

test/tap/add-remote-git.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ function setup (cb) {
8080
'--listen=localhost',
8181
'--export-all',
8282
'--base-path=.',
83+
'--reuseaddr',
8384
'--port=1234'
8485
],
8586
{

test/tap/git-dependency-install-link.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var pjParent = JSON.stringify({
3030
name: 'parent',
3131
version: '1.2.3',
3232
dependencies: {
33-
'child': 'git://localhost:1243/child.git'
33+
'child': 'git://localhost:1234/child.git'
3434
}
3535
}, null, 2) + '\n'
3636

@@ -135,7 +135,8 @@ function setup (cb) {
135135
'--listen=localhost',
136136
'--export-all',
137137
'--base-path=.',
138-
'--port=1243'
138+
'--reuseaddr',
139+
'--port=1234'
139140
],
140141
{
141142
cwd: pkg,

0 commit comments

Comments
 (0)