From ce7b030e1e1b8325d0d9cfebe98292b9d0227d3c Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Thu, 26 Jul 2018 13:01:22 -0500 Subject: [PATCH] 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)` --- test/blockchain.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/blockchain.js b/test/blockchain.js index 52bfc431..36e1f688 100644 --- a/test/blockchain.js +++ b/test/blockchain.js @@ -1,6 +1,7 @@ /*globals describe, it*/ const Blockchain = require('../lib/cmds/blockchain/blockchain'); const constants = require('../lib/constants.json'); +const {defaultHost} = require('../lib/utils/host'); const assert = require('assert'); @@ -19,7 +20,7 @@ describe('embark.Blockchain', function () { geth_bin: 'geth', datadir: false, mineWhenNeeded: false, - rpcHost: 'localhost', + rpcHost: defaultHost, rpcPort: 8545, rpcApi: ['eth', 'web3', 'net', 'debug'], rpcCorsDomain: false, @@ -33,7 +34,7 @@ describe('embark.Blockchain', function () { account: {}, bootnodes: "", wsApi: ["eth", "web3", "net", "shh", "debug"], - wsHost: "localhost", + wsHost: defaultHost, wsOrigins: false, wsPort: 8546, wsRPC: true, @@ -63,7 +64,7 @@ describe('embark.Blockchain', function () { geth_bin: 'geth', datadir: '/foo/datadir/', mineWhenNeeded: true, - rpcHost: 'someserver', + rpcHost: defaultHost, rpcPort: 12345, rpcApi: ['eth', 'web3', 'net', 'debug'], rpcCorsDomain: true, @@ -77,9 +78,9 @@ describe('embark.Blockchain', function () { account: {}, bootnodes: "", wsApi: ["eth", "web3", "net", "shh", "debug"], - wsHost: "localhost", + wsHost: defaultHost, wsOrigins: false, - wsPort: 8546, + wsPort: 12346, wsRPC: true, targetGasLimit: false, syncMode: undefined,