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

@ -362,7 +362,7 @@ app.on("ready", () => {
} }
callback.apply(null, arg) callback.apply(null, arg)
}) })
}, app.getPath("userData"), app.getVersion()) }, app.getPath("userData"), app.getVersion(), env.name)
}) })
}); });

View File

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