Skip to content

Commit

Permalink
test wallets fix
Browse files Browse the repository at this point in the history
  • Loading branch information
micax3000 committed Aug 30, 2022
1 parent 4af411b commit ffc0757
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
1 change: 0 additions & 1 deletion test/bdd/features/publish-errors.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Feature: Publish errors test
# When I call publish on node 1 with validAssertion
# And Last publish finished with status: PublishStartError

##
@publish-errors
Scenario: Node is not able to validate assertion on the network
Given I setup 4 nodes
Expand Down
5 changes: 3 additions & 2 deletions test/bdd/steps/api/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ When(
/^I call publish on ot-node (\d+) directly with ([^"]*)/,
{ timeout: 60000 },
async function publish(node, requestName) {
this.logger.log(`I call publish on ot-node ${node} directly`);
expect(
!!requests[requestName],
`Request body with name: ${requestName} not found!`,
Expand Down Expand Up @@ -92,12 +93,12 @@ Given('I wait for last publish to finalize', { timeout: 80000 }, async function
assert.fail('Unable to get publish result');
}
// eslint-disable-next-line no-await-in-loop
await setTimeout(4000);
await setTimeout(5000);
}
});

Given(
/Last publish finished with status: ([COMPLETED|FAILED|PublishValidateAssertionError,PUblishStartError]+)$/,
/Last publish finished with status: ([COMPLETED|FAILED|PublishValidateAssertionError,PublishStartError]+)$/,
{ timeout: 60000 },
async function lastPublishFinished(status) {
this.logger.log(`Last publish finished with status: ${status}`);
Expand Down
15 changes: 8 additions & 7 deletions test/bdd/steps/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function getBlockchainConfiguration(localBlockchain, privateKey, publicKey, mana
evmOperationalWalletPublicKey: publicKey,
evmOperationalWalletPrivateKey: privateKey,
evmManagementWalletPublicKey: managementKey,
evmManagementPublicKey: managementKey,
},
},
},
Expand Down Expand Up @@ -99,8 +100,8 @@ Given(/^I setup (\d+) node[s]*$/, { timeout: 80000 }, function nodeSetup(nodeCou
let nodesStarted = 0;
for (let i = 0; i < nodeCount; i += 1) {
const nodeIndex = currentNumberOfNodes + i;
const wallet = wallets[nodeIndex];
const managementWallet = wallets[nodeIndex + 28];
const wallet = wallets[nodeIndex + 1];
const managementWallet = wallets[nodeIndex + 1 + 27];
const rpcPort = 8901 + nodeIndex;
const nodeName = `origintrail-test-${nodeIndex}`;

Expand Down Expand Up @@ -205,8 +206,8 @@ Given(
let nodesStarted = 0;
for (let i = 0; i < nodeCount; i += 1) {
const nodeIndex = currentNumberOfNodes + i;
const wallet = wallets[nodeIndex];
const managementWallet = wallets[nodeIndex + 28];
const wallet = wallets[nodeIndex + 1];
const managementWallet = wallets[nodeIndex + 1 + 27];
const rpcPort = 8901 + nodeIndex;
const nodeName = `origintrail-test-${nodeIndex}`;
const nodeConfiguration = DeepExtend(
Expand Down Expand Up @@ -267,8 +268,8 @@ Given(
{ timeout: 120000 },
function setupPublishNode(nodeIndex, done) {
this.logger.log(`I setup node ${nodeIndex} with invalid configuration`);
const wallet = this.state.localBlockchain.getWallets()[nodeIndex - 1];
const managementWallet = this.state.localBlockchain.getWallets()[nodeIndex - 1 + 28];
const wallet = this.state.localBlockchain.getWallets()[nodeIndex];
const managementWallet = this.state.localBlockchain.getWallets()[nodeIndex + 27];
const rpcPort = 8901 + nodeIndex - 1;
const nodeName = `origintrail-test-${nodeIndex - 1}`;
const nodeConfiguration = DeepExtend(
Expand All @@ -278,7 +279,7 @@ Given(
this,
wallet,
managementWallet,
nodeIndex,
nodeIndex - 1,
nodeName,
rpcPort,
),
Expand Down
4 changes: 2 additions & 2 deletions test/bdd/steps/config/origintrail-test-bootstrap-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"hubContractAddress": "0x378ec78F621E2C8Aeff345b39334c38B0Bb7b96F",
"evmOperationalWalletPublicKey": "0x1152b7ea23b7b9890ce2e9abf95119038d7644e0",
"evmOperationalWalletPrivateKey": "3cf97be6177acdd12796b387f58f84f177d0fe20d8558004e8db9a41cf90392a",
"evmManagementWalletPublicKey": "0x20bd8f91585bebf91ae96c897c38429ebc2291c7",
"evmManagementPublicKey": "0x20bd8f91585bebf91ae96c897c38429ebc2291c7"
"evmManagementWalletPublicKey": "0x76014481ed80a4bb57eba8f279d0d2489db5d136",
"evmManagementPublicKey": "0x76014481ed80a4bb57eba8f279d0d2489db5d136"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/bdd/steps/config/origintrail-test-node-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"hubContractAddress": "0x378ec78F621E2C8Aeff345b39334c38B0Bb7b96F",
"evmOperationalWalletPublicKey": "0x19ad96f87f8e1c13e99a98d8174e00f5a7c82df1",
"evmOperationalWalletPrivateKey": "1e60c8e9aa35064cd2eaa4c005bda2b76ef1a858feebb6c8e131c472d16f9740",
"evmManagementWalletPublicKey": "0x1de33ab36099f60c6a41a1b8f71939428773b169",
"evmManagementPublicKey" : "0x1de33ab36099f60c6a41a1b8f71939428773b169"
"evmManagementWalletPublicKey": "0xc96dfe1017168f5b5e2518df8048b7b6da9f7bd1",
"evmManagementPublicKey" : "0xc96dfe1017168f5b5e2518df8048b7b6da9f7bd1"
}
}
}
Expand Down

0 comments on commit ffc0757

Please sign in to comment.