Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add slightly more obscure test ports

  • Loading branch information...
commit 4fe98ae5aa3253d7e2f84aa72054ee4ec3d08eb5 1 parent 4efa354
@tj tj authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 test/remotes.js
View
18 test/remotes.js
@@ -30,26 +30,26 @@ describe('component install from remote', function(){
fs.writeFile('test/private-registry/testdependencies/master/component.json', JSON.stringify({
name: 'testdependencies',
repo: 'private-registry/testdependencies',
- remotes: ['http://localhost:3000'],
+ remotes: ['http://localhost:4000'],
dependencies: {'private-registry/testcomponent': "*"}
}), done);
})
before(function(done){
app.use(express.static(__dirname));
- app.listen(3000, done);
+ app.listen(4000, done);
})
before(function(done){
auth.use(express.basicAuth('admin', '1234'));
auth.use(express.static(__dirname));
- auth.listen(3001, done);
+ auth.listen(4001, done);
})
describe('without authentication', function(){
beforeEach(function(done){
fs.writeFile('component.json', JSON.stringify({
- remotes: ['http://localhost:3000']
+ remotes: ['http://localhost:4000']
}), done);
})
@@ -64,7 +64,7 @@ describe('component install from remote', function(){
done();
})
})
-
+
it('should fallback to github', function(done){
exec('bin/component install component/emitter', function(err, stdout, stderr){
if (err) return done(err);
@@ -98,7 +98,7 @@ describe('component install from remote', function(){
describe('url notation', function(done){
before(function(done){
fs.writeFile('component.json', JSON.stringify({
- remotes: ['http://admin:1234@localhost:3001']
+ remotes: ['http://admin:1234@localhost:4001']
}), done);
})
@@ -118,7 +118,7 @@ describe('component install from remote', function(){
describe('and bad credentials', function(){
beforeEach(function(done){
fs.writeFile('component.json', JSON.stringify({
- remotes: ['http://admin:abcd@localhost:3001']
+ remotes: ['http://admin:abcd@localhost:4001']
}), done);
})
@@ -126,9 +126,9 @@ describe('component install from remote', function(){
exec('bin/component install private-registry/testcomponent', function(err, stdout, stderr){
if (err) return done(err);
stderr.should.include('error');
- stderr.should.include('failed to fetch http://admin:abcd@localhost:3001/private-registry/testcomponent/master/component.json');
+ stderr.should.include('failed to fetch http://admin:abcd@localhost:4001/private-registry/testcomponent/master/component.json');
stderr.should.include('got 401 "Unauthorized"');
- assert(!exists('components/private-registry-testcomponent/component.json'),
+ assert(!exists('components/private-registry-testcomponent/component.json'),
'component should not be installed');
done();
})
Please sign in to comment.
Something went wrong with that request. Please try again.