Skip to content

Commit

Permalink
chore: update DashCore service image version to 0.15
Browse files Browse the repository at this point in the history
* chore: update `DashCore` service image version to `0.15`

* chore: bump version

* chore: use `generateToAddress` method

* chore: update dependencies

* chore: update `package-lock`

* fix: usage of the `generateToAddress`

* fix: mount points test assertions
  • Loading branch information
jawid-h committed Feb 27, 2020
1 parent b212f2f commit c698328
Show file tree
Hide file tree
Showing 8 changed files with 344 additions and 270 deletions.
2 changes: 1 addition & 1 deletion lib/services/dashCore/DashCoreOptions.js
Expand Up @@ -26,7 +26,7 @@ class DashCoreOptions extends DockerServiceOptions {
};

const defaultContainerOptions = {
image: 'dashpay/dashd:evo-latest',
image: 'dashpay/dashd:0.15',
network: {
name: 'dash_test_network',
driver: 'bridge',
Expand Down
3 changes: 2 additions & 1 deletion lib/services/dashCore/startDashCore.js
Expand Up @@ -34,7 +34,8 @@ startDashCore.many = async function many(number, options) {
// Workaround for develop branch
// We should generate genesis block before we connect instances
if (i === 0 && number > 1) {
await instance.getApi().generate(1);
const { result: address } = await instance.getApi().getNewAddress();
await instance.getApi().generateToAddress(1, address);
}

if (instances.length > 0) {
Expand Down
578 changes: 324 additions & 254 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "@dashevo/dp-services-ctl",
"version": "0.11.0-dev.2",
"version": "0.11.0-dev.3",
"description": "Control Dash Platform services using JavaScript and Docker",
"engines": {
"node": ">=8"
Expand Down Expand Up @@ -50,8 +50,8 @@
"cids": "^0.6.0"
},
"dependencies": {
"@dashevo/dapi-client": "~0.9.0-dev.5",
"@dashevo/dashd-rpc": "^1.3.1",
"@dashevo/dapi-client": "~0.9.0-dev.6",
"@dashevo/dashd-rpc": "^2.0.0",
"@dashevo/drive-grpc": "~0.3.0",
"aws-sdk": "^2.382.0",
"axios": "^0.19.0",
Expand Down
10 changes: 6 additions & 4 deletions test/integration/services/dashCore/createDashCore.js
Expand Up @@ -120,7 +120,8 @@ describe('createDashCore', function main() {
it('should have several instances connected to each other', async () => {
// Workaround for develop branch
// We should generate genesis block before we connect instances
await instanceOne.getApi().generate(1);
const { result: address } = await instanceOne.getApi().getNewAddress();
await instanceOne.getApi().generateToAddress(1, address);

await instanceOne.connect(instanceTwo);
await wait(2000);
Expand All @@ -143,7 +144,8 @@ describe('createDashCore', function main() {
expect(blocksInstanceOne).to.equal(1);
expect(blocksInstanceTwo).to.equal(1);

await instanceOne.rpcClient.generate(2);
const { result: address } = await instanceOne.rpcClient.getNewAddress();
await instanceOne.rpcClient.generateToAddress(2, address);
await wait(3000);

const { result: blocksOne } = await instanceOne.rpcClient.getBlockCount();
Expand Down Expand Up @@ -217,7 +219,7 @@ describe('createDashCore', function main() {

const { Mounts } = await instance.container.inspect();

expect(Mounts[0].Destination).to.equal(CONTAINER_VOLUME);
expect(Mounts.map(mount => mount.Destination)).to.include(CONTAINER_VOLUME);
});

it('should be able to start an instance with DashCoreOptions', async () => {
Expand All @@ -237,7 +239,7 @@ describe('createDashCore', function main() {

const { Mounts } = await instance.container.inspect();

expect(Mounts[0].Destination).to.equal(CONTAINER_VOLUME);
expect(Mounts.map(mount => mount.Destination)).to.include(CONTAINER_VOLUME);
});

it('should be able to start an instance with custom default DashCoreOptions', async () => {
Expand Down
7 changes: 4 additions & 3 deletions test/integration/services/dashCore/startDashCore.js
Expand Up @@ -30,7 +30,7 @@ describe('startDashCore', function main() {
const { State, Mounts } = await dashCoreNode.container.inspect();

expect(State.Status).to.equal('running');
expect(Mounts[0].Destination).to.equal(CONTAINER_VOLUME);
expect(Mounts.map(mount => mount.Destination)).to.include(CONTAINER_VOLUME);
});

it('should have RPC connected', async () => {
Expand Down Expand Up @@ -69,7 +69,7 @@ describe('startDashCore', function main() {
const { State, Mounts } = await dashCoreNodes[i].container.inspect();

expect(State.Status).to.equal('running');
expect(Mounts[0].Destination).to.equal(CONTAINER_VOLUME);
expect(Mounts.map(mount => mount.Destination)).to.include(CONTAINER_VOLUME);
}
});

Expand All @@ -80,7 +80,8 @@ describe('startDashCore', function main() {
expect(blocks).to.equal(1);
}

await dashCoreNodes[0].rpcClient.generate(2);
const { result: address } = await dashCoreNodes[0].rpcClient.getNewAddress();
await dashCoreNodes[0].rpcClient.generateToAddress(2, address);

await wait(5000);

Expand Down
4 changes: 2 additions & 2 deletions test/integration/services/startDapi.js
Expand Up @@ -44,7 +44,7 @@ describe('startDapi', function main() {
const { State, Mounts } = await dapiNode.driveApi.container.inspect();

expect(State.Status).to.equal('running');
expect(Mounts[0].Destination).to.equal(CONTAINER_VOLUME);
expect(Mounts.map(mount => mount.Destination)).to.include(CONTAINER_VOLUME);
});

it('should have Insight API container running', async () => {
Expand Down Expand Up @@ -250,7 +250,7 @@ describe('startDapi', function main() {
const { State, Mounts } = await dapiNodes[i].driveApi.container.inspect();

expect(State.Status).to.equal('running');
expect(Mounts[0].Destination).to.equal(CONTAINER_VOLUME);
expect(Mounts.map(mount => mount.Destination)).to.include(CONTAINER_VOLUME);
}
});

Expand Down
4 changes: 2 additions & 2 deletions test/integration/services/startDrive.js
Expand Up @@ -43,7 +43,7 @@ describe('startDrive', function main() {
const { State, Mounts } = await driveNode.driveApi.container.inspect();

expect(State.Status).to.equal('running');
expect(Mounts[0].Destination).to.equal(CONTAINER_VOLUME);
expect(Mounts.map(mount => mount.Destination)).to.include(CONTAINER_VOLUME);
});

it('should have proper env variables set for Drive container', async () => {
Expand Down Expand Up @@ -128,7 +128,7 @@ describe('startDrive', function main() {
const { State, Mounts } = await driveNodes[i].driveApi.container.inspect();

expect(State.Status).to.equal('running');
expect(Mounts[0].Destination).to.equal(CONTAINER_VOLUME);
expect(Mounts.map(mount => mount.Destination)).to.include(CONTAINER_VOLUME);
}
});
});
Expand Down

0 comments on commit c698328

Please sign in to comment.