Skip to content

Commit

Permalink
Trying to change the tests for ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Micah Riggan committed Jun 14, 2018
1 parent 66592b9 commit 11fc487
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 1 addition & 6 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
- 8100:8100
- 3000:3000
environment:
- DB_HOST=db:27017
- DB_HOST=db
- DB_NAME=bitcore-test
- BITCORE_CONFIG_PATH=/bitcore/bitcore-test.config.json
depends_on:
Expand All @@ -19,13 +19,8 @@ services:

db:
image: mongo
ports:
- 27018:27017

bitcoin:
ports:
- 8332:8332
- 8333:8333
image: ruimarinho/bitcoin-core:0.16.0-alpine
command:
-printtoconsole
Expand Down
8 changes: 5 additions & 3 deletions packages/bitcore-node/test/integration/services/p2p.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ async function localHeight() {
}

async function verify(rpc: RPC, tail: number) {
const chain = 'BTC';
const network = 'regtest';
const myTip = await BlockModel.getLocalTip({
chain: 'BTC',
network: 'regtest',
chain,
network,
});
const poolTip = await rpc.bestBlockHashAsync();

Expand All @@ -86,7 +88,7 @@ async function verify(rpc: RPC, tail: number) {

// check block is correct
const truth = await rpc.blockAsync(hash);
const ours = await BlockModel.find({ hash });
const ours = await BlockModel.find({ hash, chain, network });
expect(ours.length, 'number of blocks').to.equal(1);
expect(ours[0].previousBlockHash, 'previous block hash').to.equal(truth.previousblockhash);
expect(ours[0].nextBlockHash, 'next block hash').to.equal(truth.nextblockhash);
Expand Down

0 comments on commit 11fc487

Please sign in to comment.