revise blockchain test re: docker awareness

use defaultHost so tests pass in docker container

+1 for wsPort relative to rpcPort

port change related to proxy now doing `server.listen(port, defaultHost)`
vs. `server.listen(port)`
This commit is contained in:
Michael Bradley, Jr 2018-07-26 13:01:22 -05:00
parent 6d4870f862
commit 4d0b536619
1 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,7 @@
/*globals describe, it*/ /*globals describe, it*/
const Blockchain = require('../lib/cmds/blockchain/blockchain'); const Blockchain = require('../lib/cmds/blockchain/blockchain');
const constants = require('../lib/constants.json'); const constants = require('../lib/constants.json');
const {defaultHost} = require('../lib/utils/host');
const assert = require('assert'); const assert = require('assert');
@ -19,7 +20,7 @@ describe('embark.Blockchain', function () {
geth_bin: 'geth', geth_bin: 'geth',
datadir: false, datadir: false,
mineWhenNeeded: false, mineWhenNeeded: false,
rpcHost: 'localhost', rpcHost: defaultHost,
rpcPort: 8545, rpcPort: 8545,
rpcApi: ['eth', 'web3', 'net', 'debug'], rpcApi: ['eth', 'web3', 'net', 'debug'],
rpcCorsDomain: false, rpcCorsDomain: false,
@ -33,7 +34,7 @@ describe('embark.Blockchain', function () {
account: {}, account: {},
bootnodes: "", bootnodes: "",
wsApi: ["eth", "web3", "net", "shh", "debug"], wsApi: ["eth", "web3", "net", "shh", "debug"],
wsHost: "localhost", wsHost: defaultHost,
wsOrigins: false, wsOrigins: false,
wsPort: 8546, wsPort: 8546,
wsRPC: true, wsRPC: true,
@ -62,7 +63,7 @@ describe('embark.Blockchain', function () {
geth_bin: 'geth', geth_bin: 'geth',
datadir: '/foo/datadir/', datadir: '/foo/datadir/',
mineWhenNeeded: true, mineWhenNeeded: true,
rpcHost: 'someserver', rpcHost: defaultHost,
rpcPort: 12345, rpcPort: 12345,
rpcApi: ['eth', 'web3', 'net', 'debug'], rpcApi: ['eth', 'web3', 'net', 'debug'],
rpcCorsDomain: true, rpcCorsDomain: true,
@ -76,9 +77,9 @@ describe('embark.Blockchain', function () {
account: {}, account: {},
bootnodes: "", bootnodes: "",
wsApi: ["eth", "web3", "net", "shh", "debug"], wsApi: ["eth", "web3", "net", "shh", "debug"],
wsHost: "localhost", wsHost: defaultHost,
wsOrigins: false, wsOrigins: false,
wsPort: 8546, wsPort: 12346,
wsRPC: true, wsRPC: true,
targetGasLimit: false, targetGasLimit: false,
syncMode: undefined, syncMode: undefined,