Skip to content

Commit

Permalink
Add a failing spec for auto acceptance
Browse files Browse the repository at this point in the history
We need to work out some other kinks before this will pass but we do
want this spec in the future.
  • Loading branch information
brianp committed Jun 9, 2022
1 parent 194ec66 commit 2bed082
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
15 changes: 13 additions & 2 deletions integration_tests/features/ValidatorNode.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,24 @@ Feature: Validator Node
And I create 40 NFTs
And I mine 3 blocks

@broken
@dan @broken
Scenario: Publish contract acceptance
Given I have a seed node NODE1
And I have wallet WALLET1 connected to all seed nodes
When I mine 9 blocks using wallet WALLET1 on NODE1
Then I wait for wallet WALLET1 to have at least 1000000 uT
And I have a validator node VN1 connected to base node NODE1 and wallet WALLET1
And I have a validator node VN1 connected to base node NODE1 and wallet WALLET1 with "constitiution_auto_accept" set to "false"
Then I publish a contract acceptance transaction for the validator node VN1
When I mine 4 blocks using wallet WALLET1 on NODE1
Then wallet WALLET1 has at least 1 transactions that are all TRANSACTION_STATUS_MINED_CONFIRMED and not cancelled

@dan @broken
Scenario: Contract auto acceptance
Given I have a seed node NODE1
And I have wallet WALLET1 connected to all seed nodes
When I mine 9 blocks using wallet WALLET1 on NODE1
Then I wait for wallet WALLET1 to have at least 1000000 uT
And I have a validator node VN1 connected to base node NODE1 and wallet WALLET1 with "constitution_auto_accept" set to "true"
Then I create a "constitution-definition" from file "fixtures/constitution_definition.json" on wallet WALLET1 via command line
When I mine 8 blocks using wallet WALLET1 on NODE1
Then wallet WALLET1 has at least 2 transactions that are all TRANSACTION_STATUS_MINED_CONFIRMED and not cancelled
6 changes: 4 additions & 2 deletions integration_tests/features/support/validator_node_steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,18 @@ Then(
);

Given(
"I have a validator node {word} connected to base node {word} and wallet {word}",
"I have a validator node {word} connected to base node {word} and wallet {word} with {word} set to {word}",
{ timeout: 20 * 1000 },
async function (vn_name, base_node_name, wallet_name) {
async function (vn_name, base_node_name, wallet_name, option_key, option_value) {
const baseNode = this.getNode(base_node_name);
const walletNode = this.getWallet(wallet_name);

const baseNodeGrpcAddress = `127.0.0.1:${baseNode.getGrpcPort()}`;
const walletGrpcAddress = `127.0.0.1:${walletNode.getGrpcPort()}`;

const options = {};
options[option_key] = option_value;

const danNode = new ValidatorNodeProcess(
vn_name,
false,
Expand Down

0 comments on commit 2bed082

Please sign in to comment.