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

Commit

Permalink
test: use --reuseaddr to fix git port conflicts
Browse files Browse the repository at this point in the history
PR-URL: #10903
Credit: @zkat
  • Loading branch information
zkat committed Jan 19, 2016
1 parent 75ab216 commit 64995be
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions test/tap/add-remote-git-fake-windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var pjParent = JSON.stringify({
name: 'parent',
version: '1.2.3',
dependencies: {
child: 'git://localhost:1233/child.git'
child: 'git://localhost:1234/child.git'
}
}, null, 2) + '\n'

Expand Down Expand Up @@ -93,7 +93,8 @@ function setup (cb) {
'--listen=localhost',
'--export-all',
'--base-path=.',
'--port=1233'
'--reuseaddr',
'--port=1234'
],
{
cwd: pkg,
Expand Down
9 changes: 5 additions & 4 deletions test/tap/add-remote-git-shrinkwrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var pjParent = JSON.stringify({
name: 'parent',
version: '1.2.3',
dependencies: {
'child': 'git://localhost:1235/child.git#master'
'child': 'git://localhost:1234/child.git#master'
}
}, null, 2) + '\n'

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

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

t.equal(
shrinkwrap.dependencies.child.resolved,
'git://localhost:1235/child.git#' + treeish,
'git://localhost:1234/child.git#' + treeish,
'npm shrinkwrapped resolved correctly'
)

Expand Down Expand Up @@ -121,7 +121,8 @@ function setup (cb) {
'--listen=localhost',
'--export-all',
'--base-path=.',
'--port=1235'
'--reuseaddr',
'--port=1234'
],
{
cwd: pkg,
Expand Down
1 change: 1 addition & 0 deletions test/tap/add-remote-git.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ function setup (cb) {
'--listen=localhost',
'--export-all',
'--base-path=.',
'--reuseaddr',
'--port=1234'
],
{
Expand Down
5 changes: 3 additions & 2 deletions test/tap/git-dependency-install-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var pjParent = JSON.stringify({
name: 'parent',
version: '1.2.3',
dependencies: {
'child': 'git://localhost:1243/child.git'
'child': 'git://localhost:1234/child.git'
}
}, null, 2) + '\n'

Expand Down Expand Up @@ -135,7 +135,8 @@ function setup (cb) {
'--listen=localhost',
'--export-all',
'--base-path=.',
'--port=1243'
'--reuseaddr',
'--port=1234'
],
{
cwd: pkg,
Expand Down

0 comments on commit 64995be

Please sign in to comment.