2013-12-19 10:11:54 -05:00
|
|
|
require('./lib/startup')
|
|
|
|
|
|
|
|
var assert = require('assert')
|
|
|
|
, async = require('async')
|
|
|
|
, crypto = require('crypto')
|
|
|
|
, ex = module.exports
|
|
|
|
|
|
|
|
function readfile(x) {
|
|
|
|
return require('fs').readFileSync(__dirname + '/' + x)
|
|
|
|
}
|
|
|
|
|
|
|
|
describe('Func', function() {
|
2013-12-29 01:40:47 -05:00
|
|
|
var server = process.server
|
|
|
|
var server2 = process.server2
|
|
|
|
|
2013-12-19 10:11:54 -05:00
|
|
|
before(function(cb) {
|
|
|
|
async.parallel([
|
|
|
|
function(cb) {
|
|
|
|
require('./lib/startup').start('./test-storage', './config-1.yaml', cb)
|
|
|
|
},
|
|
|
|
function(cb) {
|
|
|
|
require('./lib/startup').start('./test-storage2', './config-2.yaml', cb)
|
|
|
|
},
|
|
|
|
], cb)
|
|
|
|
})
|
|
|
|
|
|
|
|
before(function auth(cb) {
|
|
|
|
async.map([server, server2], function(server, cb) {
|
|
|
|
server.auth('test', 'test', function(res, body) {
|
|
|
|
assert.equal(res.statusCode, 201)
|
|
|
|
assert.notEqual(body.ok.indexOf('"test"'), -1)
|
|
|
|
cb()
|
|
|
|
})
|
|
|
|
}, cb)
|
|
|
|
})
|
|
|
|
|
|
|
|
it('authenticate', function(){/* test for before() */})
|
|
|
|
|
|
|
|
require('./basic')()
|
|
|
|
require('./gh29')()
|
|
|
|
require('./tags')()
|
2014-03-30 16:05:42 -05:00
|
|
|
require('./gzip')()
|
2014-03-07 14:48:24 -05:00
|
|
|
require('./incomplete')()
|
2013-12-19 10:11:54 -05:00
|
|
|
require('./mirror')()
|
2014-04-12 21:04:48 -05:00
|
|
|
require('./newnpmreg')()
|
2013-12-19 10:11:54 -05:00
|
|
|
require('./race')()
|
2014-03-07 13:20:41 -05:00
|
|
|
require('./racycrash')()
|
2013-12-29 01:40:47 -05:00
|
|
|
require('./security')()
|
2014-07-22 16:45:28 -05:00
|
|
|
require('./adduser')()
|
2013-12-29 01:40:47 -05:00
|
|
|
require('./addtag')()
|
2013-12-19 10:11:54 -05:00
|
|
|
})
|
|
|
|
|