Skip to content

Commit 4d0b536

Browse files
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)`
1 parent 6d4870f commit 4d0b536

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test/blockchain.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*globals describe, it*/
22
const Blockchain = require('../lib/cmds/blockchain/blockchain');
33
const constants = require('../lib/constants.json');
4+
const {defaultHost} = require('../lib/utils/host');
45

56
const assert = require('assert');
67

@@ -19,7 +20,7 @@ describe('embark.Blockchain', function () {
1920
geth_bin: 'geth',
2021
datadir: false,
2122
mineWhenNeeded: false,
22-
rpcHost: 'localhost',
23+
rpcHost: defaultHost,
2324
rpcPort: 8545,
2425
rpcApi: ['eth', 'web3', 'net', 'debug'],
2526
rpcCorsDomain: false,
@@ -33,7 +34,7 @@ describe('embark.Blockchain', function () {
3334
account: {},
3435
bootnodes: "",
3536
wsApi: ["eth", "web3", "net", "shh", "debug"],
36-
wsHost: "localhost",
37+
wsHost: defaultHost,
3738
wsOrigins: false,
3839
wsPort: 8546,
3940
wsRPC: true,
@@ -62,7 +63,7 @@ describe('embark.Blockchain', function () {
6263
geth_bin: 'geth',
6364
datadir: '/foo/datadir/',
6465
mineWhenNeeded: true,
65-
rpcHost: 'someserver',
66+
rpcHost: defaultHost,
6667
rpcPort: 12345,
6768
rpcApi: ['eth', 'web3', 'net', 'debug'],
6869
rpcCorsDomain: true,
@@ -76,9 +77,9 @@ describe('embark.Blockchain', function () {
7677
account: {},
7778
bootnodes: "",
7879
wsApi: ["eth", "web3", "net", "shh", "debug"],
79-
wsHost: "localhost",
80+
wsHost: defaultHost,
8081
wsOrigins: false,
81-
wsPort: 8546,
82+
wsPort: 12346,
8283
wsRPC: true,
8384
targetGasLimit: false,
8485
syncMode: undefined,

0 commit comments

Comments
 (0)