From 2bed0829f8d5ad9a2e448aa6c87b3e2a58277dbc Mon Sep 17 00:00:00 2001 From: brianp Date: Thu, 9 Jun 2022 11:12:16 +0200 Subject: [PATCH] Add a failing spec for auto acceptance We need to work out some other kinks before this will pass but we do want this spec in the future. --- integration_tests/features/ValidatorNode.feature | 15 +++++++++++++-- .../features/support/validator_node_steps.js | 6 ++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/integration_tests/features/ValidatorNode.feature b/integration_tests/features/ValidatorNode.feature index 85a7dfcfe8..64f766058f 100644 --- a/integration_tests/features/ValidatorNode.feature +++ b/integration_tests/features/ValidatorNode.feature @@ -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 diff --git a/integration_tests/features/support/validator_node_steps.js b/integration_tests/features/support/validator_node_steps.js index 4f05f298b8..2a64560dff 100644 --- a/integration_tests/features/support/validator_node_steps.js +++ b/integration_tests/features/support/validator_node_steps.js @@ -123,9 +123,9 @@ 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); @@ -133,6 +133,8 @@ Given( const walletGrpcAddress = `127.0.0.1:${walletNode.getGrpcPort()}`; const options = {}; + options[option_key] = option_value; + const danNode = new ValidatorNodeProcess( vn_name, false,