fix(tests): fix net code on test env

This commit is contained in:
DEg
2018-04-01 03:57:16 +03:00
parent 4837293af4
commit 534999d1cb
2 changed files with 8 additions and 2 deletions

View File

@ -36,7 +36,7 @@ const torrentClient = require('./torrentClient')
//server.listen(config.httpPort);
//console.log('Listening web server on', config.httpPort, 'port')
module.exports = function (send, recive, dataDirectory, version)
module.exports = function (send, recive, dataDirectory, version, env)
{
let torrentsId = 1;
@ -767,6 +767,12 @@ this.stop = (callback) => {
if(config.p2pBootstrap)
{
const saveBootstrapPeers = (host, path, callback) => {
if(env === 'test')
{
callback()
return
}
const options = {
port: 443,
host,