From fe1efab616ce86f86c899874d86e0a9ef013ca7d Mon Sep 17 00:00:00 2001 From: ksrichard Date: Mon, 11 Nov 2024 14:38:20 +0100 Subject: [PATCH] updated cucumber tests to reflect new changes --- integration_tests/src/base_node.rs | 1 + .../tests/features/claim_burn.feature | 12 +++++----- .../tests/features/committee.feature | 6 ++--- .../tests/features/concurrency.feature | 4 ++-- .../tests/features/counter.feature | 10 ++++----- .../tests/features/epoch_change.feature | 6 ++--- .../tests/features/fungible.feature | 6 ++--- .../tests/features/indexer.feature | 10 ++++----- integration_tests/tests/features/nft.feature | 8 +++---- .../tests/features/state_sync.feature | 10 ++++----- .../tests/features/substates.feature | 4 ++-- .../tests/features/transfer.feature | 22 +++++++++---------- .../tests/features/wallet_daemon.feature | 14 ++++++------ 13 files changed, 57 insertions(+), 56 deletions(-) diff --git a/integration_tests/src/base_node.rs b/integration_tests/src/base_node.rs index ae933ff03..8b4623fe8 100644 --- a/integration_tests/src/base_node.rs +++ b/integration_tests/src/base_node.rs @@ -132,6 +132,7 @@ pub async fn spawn_base_node(world: &mut TariWorld, bn_name: String) { GrpcMethod::GetTemplateRegistrations, GrpcMethod::GetHeaderByHash, GrpcMethod::GetSideChainUtxos, + GrpcMethod::GetValidatorNodeChanges, ] .into(); diff --git a/integration_tests/tests/features/claim_burn.feature b/integration_tests/tests/features/claim_burn.feature index bcac12f76..10b7a9f90 100644 --- a/integration_tests/tests/features/claim_burn.feature +++ b/integration_tests/tests/features/claim_burn.feature @@ -18,8 +18,8 @@ Feature: Claim Burn When miner MINER mines 4 new blocks When wallet WALLET has at least 5000 T When validator node VN sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks - Then VN has scanned to height 17 + When miner MINER mines 26 new blocks + Then VN has scanned to height 27 Then the validator node VN is listed as registered # Initialize an indexer @@ -36,7 +36,7 @@ Feature: Claim Burn # unfortunately have to wait for this to get into the mempool.... Then there is 1 transaction in the mempool of BASE within 10 seconds When miner MINER mines 13 new blocks - Then VN has scanned to height 30 + Then VN has scanned to height 40 When I convert commitment COMMITMENT into COMM_ADDRESS address Then validator node VN has state at COMM_ADDRESS within 20 seconds @@ -57,8 +57,8 @@ Feature: Claim Burn When miner MINER mines 4 new blocks When wallet WALLET has at least 10000 T When validator node VN sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks - Then VN has scanned to height 17 + When miner MINER mines 26 new blocks + Then VN has scanned to height 27 Then the validator node VN is listed as registered # Initialize an indexer @@ -75,7 +75,7 @@ Feature: Claim Burn # unfortunately have to wait for this to get into the mempool.... Then there is 1 transaction in the mempool of BASE within 10 seconds When miner MINER mines 13 new blocks - Then VN has scanned to height 30 + Then VN has scanned to height 40 When I convert commitment COMMITMENT into COMM_ADDRESS address Then validator node VN has state at COMM_ADDRESS within 20 seconds diff --git a/integration_tests/tests/features/committee.feature b/integration_tests/tests/features/committee.feature index bd2fac12f..c26fce759 100644 --- a/integration_tests/tests/features/committee.feature +++ b/integration_tests/tests/features/committee.feature @@ -28,9 +28,9 @@ Feature: Committee scenarios # Register the "counter" template When base wallet WALLET registers the template "counter" - When miner MINER mines 15 new blocks - Then VAL_1 has scanned to height 18 - Then VAL_2 has scanned to height 18 + When miner MINER mines 25 new blocks + Then VAL_1 has scanned to height 28 + Then VAL_2 has scanned to height 28 Then the validator node VAL_1 is listed as registered Then the validator node VAL_2 is listed as registered Then the template "counter" is listed as registered by the validator node VAL_1 diff --git a/integration_tests/tests/features/concurrency.feature b/integration_tests/tests/features/concurrency.feature index cdea04e27..1f0e7c32e 100644 --- a/integration_tests/tests/features/concurrency.feature +++ b/integration_tests/tests/features/concurrency.feature @@ -20,7 +20,7 @@ Feature: Concurrency When miner MINER mines 10 new blocks When wallet WALLET has at least 2000 T When validator node VN sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks + When miner MINER mines 26 new blocks Then the validator node VN is listed as registered # Initialize indexer and connect wallet daemon @@ -30,7 +30,7 @@ Feature: Concurrency # Register the "counter" template When base wallet WALLET registers the template "counter" When miner MINER mines 20 new blocks - Then VN has scanned to height 43 + Then VN has scanned to height 53 # Create the sender account When I create an account ACC via the wallet daemon WALLET_D with 10000 free coins diff --git a/integration_tests/tests/features/counter.feature b/integration_tests/tests/features/counter.feature index 2b899a42e..8a6347dde 100644 --- a/integration_tests/tests/features/counter.feature +++ b/integration_tests/tests/features/counter.feature @@ -19,7 +19,7 @@ Feature: Counter template When miner MINER mines 10 new blocks When wallet WALLET has at least 2000 T When validator node VN sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks + When miner MINER mines 26 new blocks Then the validator node VN is listed as registered # Initialize indexer and connect wallet daemon @@ -29,7 +29,7 @@ Feature: Counter template # Register the "counter" template When base wallet WALLET registers the template "counter" When miner MINER mines 20 new blocks - Then VN has scanned to height 43 + Then VN has scanned to height 53 # Create the sender account When I create an account ACC via the wallet daemon WALLET_D with 10000 free coins @@ -44,7 +44,7 @@ Feature: Counter template # Check that the counter has been increased When I invoke on wallet daemon WALLET_D on account ACC on component COUNTER/components/Counter the method call "value" the result is "1" - + Scenario: Counter template registration and invocation multiple times # Initialize a base node, wallet, miner and VN @@ -59,7 +59,7 @@ Feature: Counter template When miner MINER mines 10 new blocks When wallet WALLET has at least 2000 T When validator node VN sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks + When miner MINER mines 26 new blocks Then the validator node VN is listed as registered # Initialize indexer and connect wallet daemon @@ -69,7 +69,7 @@ Feature: Counter template # Register the "counter" template When base wallet WALLET registers the template "counter" When miner MINER mines 20 new blocks - Then VN has scanned to height 43 + Then VN has scanned to height 53 # Create the sender account When I create an account ACC via the wallet daemon WALLET_D with 10000 free coins diff --git a/integration_tests/tests/features/epoch_change.feature b/integration_tests/tests/features/epoch_change.feature index 05d3ab420..5d65336f8 100644 --- a/integration_tests/tests/features/epoch_change.feature +++ b/integration_tests/tests/features/epoch_change.feature @@ -24,8 +24,8 @@ Feature: Epoch change When base wallet WALLET registers the template "faucet" # Mine them into registered epoch - When miner MINER mines 16 new blocks - Then VAL has scanned to height 19 + When miner MINER mines 26 new blocks + Then VAL has scanned to height 29 Then the validator node VAL is listed as registered Then the template "faucet" is listed as registered by the validator node VAL @@ -42,7 +42,7 @@ Feature: Epoch change When Block count on VN VAL is at least 6 When miner MINER mines 5 new blocks - Then VAL has scanned to height 24 + Then VAL has scanned to height 34 Then the validator node VAL switches to epoch 2 # @serial diff --git a/integration_tests/tests/features/fungible.feature b/integration_tests/tests/features/fungible.feature index 67d3dff67..0c10677c9 100644 --- a/integration_tests/tests/features/fungible.feature +++ b/integration_tests/tests/features/fungible.feature @@ -4,7 +4,7 @@ @concurrent @fungible Feature: Fungible tokens - + Scenario: Mint fungible tokens ##### Setup @@ -20,7 +20,7 @@ Feature: Fungible tokens When miner MINER mines 10 new blocks When wallet WALLET has at least 2000 T When validator node VN sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks + When miner MINER mines 26 new blocks Then the validator node VN is listed as registered # Initialize indexer and connect wallet daemon @@ -30,7 +30,7 @@ Feature: Fungible tokens # Register the "faucet" template When base wallet WALLET registers the template "faucet" When miner MINER mines 20 new blocks - Then VN has scanned to height 43 + Then VN has scanned to height 53 Then the template "faucet" is listed as registered by the validator node VN ##### Scenario diff --git a/integration_tests/tests/features/indexer.feature b/integration_tests/tests/features/indexer.feature index e40a4bccd..afd1dead7 100644 --- a/integration_tests/tests/features/indexer.feature +++ b/integration_tests/tests/features/indexer.feature @@ -20,7 +20,7 @@ Feature: Indexer node When miner MINER mines 10 new blocks When wallet WALLET has at least 2000 T When validator node VN sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks + When miner MINER mines 26 new blocks Then the validator node VN is listed as registered # Initialize indexer and connect wallet daemon @@ -31,7 +31,7 @@ Feature: Indexer node When base wallet WALLET registers the template "counter" When base wallet WALLET registers the template "basic_nft" When miner MINER mines 20 new blocks - Then VN has scanned to height 43 + Then VN has scanned to height 53 Then the template "counter" is listed as registered by the validator node VN Then the template "basic_nft" is listed as registered by the validator node VN @@ -113,7 +113,7 @@ Feature: Indexer node When miner MINER mines 10 new blocks When wallet WALLET has at least 2000 T When validator node VN sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks + When miner MINER mines 26 new blocks Then the validator node VN is listed as registered # Initialize indexer and connect wallet daemon @@ -145,7 +145,7 @@ Feature: Indexer node When miner MINER mines 10 new blocks When wallet WALLET has at least 2000 T When validator node VN sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks + When miner MINER mines 26 new blocks Then the validator node VN is listed as registered # Initialize indexer and connect wallet daemon @@ -155,7 +155,7 @@ Feature: Indexer node # Register template When base wallet WALLET registers the template "faucet" When miner MINER mines 20 new blocks - Then VN has scanned to height 43 + Then VN has scanned to height 53 Then the template "faucet" is listed as registered by the validator node VN When I create an account ACC_1 via the wallet daemon WALLET_D with 10000 free coins diff --git a/integration_tests/tests/features/nft.feature b/integration_tests/tests/features/nft.feature index 1fbe8bf36..1e8ebf72a 100644 --- a/integration_tests/tests/features/nft.feature +++ b/integration_tests/tests/features/nft.feature @@ -20,7 +20,7 @@ Feature: NFTs When miner MINER mines 10 new blocks When wallet WALLET has at least 2000 T When validator node VN sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks + When miner MINER mines 26 new blocks Then the validator node VN is listed as registered # Initialize indexer and connect wallet daemon @@ -30,7 +30,7 @@ Feature: NFTs # Register the "basic_nft" template When base wallet WALLET registers the template "basic_nft" When miner MINER mines 20 new blocks - Then VN has scanned to height 43 + Then VN has scanned to height 53 Then the template "basic_nft" is listed as registered by the validator node VN ###### Scenario @@ -93,7 +93,7 @@ Feature: NFTs When miner MINER mines 10 new blocks When wallet WALLET has at least 2000 T When validator node VN sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks + When miner MINER mines 26 new blocks Then the validator node VN is listed as registered # Initialize indexer and connect wallet daemon @@ -104,7 +104,7 @@ Feature: NFTs # Register the "basic_nft" template When base wallet WALLET registers the template "basic_nft" When miner MINER mines 20 new blocks - Then VN has scanned to height 43 + Then VN has scanned to height 53 Then the template "basic_nft" is listed as registered by the validator node VN diff --git a/integration_tests/tests/features/state_sync.feature b/integration_tests/tests/features/state_sync.feature index 9a59d66d1..9d8258475 100644 --- a/integration_tests/tests/features/state_sync.feature +++ b/integration_tests/tests/features/state_sync.feature @@ -21,9 +21,9 @@ Feature: State Sync When miner MINER mines 4 new blocks When wallet WALLET has at least 5000 T When validator node VN sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks - Then VN has scanned to height 17 - And indexer IDX has scanned to height 17 + When miner MINER mines 26 new blocks + Then VN has scanned to height 27 + And indexer IDX has scanned to height 27 Then the validator node VN is listed as registered When indexer IDX connects to all other validators @@ -43,8 +43,8 @@ Feature: State Sync When validator node VN2 sends a registration transaction to base wallet WALLET When miner MINER mines 20 new blocks - Then VN has scanned to height 37 - Then VN2 has scanned to height 37 + Then VN has scanned to height 47 + Then VN2 has scanned to height 47 Then the validator node VN2 is listed as registered When I wait for validator VN has leaf block height of at least 1 at epoch 3 diff --git a/integration_tests/tests/features/substates.feature b/integration_tests/tests/features/substates.feature index 2c9601b15..82b3d18a6 100644 --- a/integration_tests/tests/features/substates.feature +++ b/integration_tests/tests/features/substates.feature @@ -23,8 +23,8 @@ Feature: Substates # Register the "counter" template When base wallet WALLET registers the template "counter" - When miner MINER mines 13 new blocks - Then VAL_1 has scanned to height 16 + When miner MINER mines 23 new blocks + Then VAL_1 has scanned to height 26 Then the validator node VAL_1 is listed as registered Then the template "counter" is listed as registered by the validator node VAL_1 diff --git a/integration_tests/tests/features/transfer.feature b/integration_tests/tests/features/transfer.feature index e24da39c8..d352e62dd 100644 --- a/integration_tests/tests/features/transfer.feature +++ b/integration_tests/tests/features/transfer.feature @@ -16,7 +16,7 @@ Feature: Account transfers When miner MINER mines 4 new blocks When wallet WALLET has at least 5000 T When validator node VN sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks + When miner MINER mines 26 new blocks Then the validator node VN is listed as registered # Initialize an indexer @@ -31,8 +31,8 @@ Feature: Account transfers When miner MINER mines 15 new blocks Then the validator node VN is listed as registered Then the template "faucet" is listed as registered by the validator node VN - Then VN has scanned to height 32 - Then indexer IDX has scanned to height 32 + Then VN has scanned to height 42 + Then indexer IDX has scanned to height 42 # Create the sender account When I create an account ACCOUNT via the wallet daemon WALLET_D with 10000 free coins @@ -43,8 +43,8 @@ Feature: Account transfers # Burn some tari in the base layer to have funds for fees in the sender account When I burn 10T on wallet WALLET with wallet daemon WALLET_D into commitment COMMITMENT with proof PROOF for ACCOUNT, range proof RANGEPROOF and claim public key CLAIM_PUBKEY When miner MINER mines 13 new blocks - Then VN has scanned to height 45 - Then indexer IDX has scanned to height 45 + Then VN has scanned to height 55 + Then indexer IDX has scanned to height 55 When I convert commitment COMMITMENT into COMM_ADDRESS address Then validator node VN has state at COMM_ADDRESS within 20 seconds @@ -93,7 +93,7 @@ Feature: Account transfers When miner MINER mines 4 new blocks When wallet WALLET has at least 5000 T When validator node VN sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks + When miner MINER mines 26 new blocks Then the validator node VN is listed as registered # Initialize an indexer @@ -122,8 +122,8 @@ Feature: Account transfers # Burn some tari in the base layer to have funds for fees in the sender account When I burn 10T on wallet WALLET with wallet daemon WALLET_D into commitment COMMITMENT with proof PROOF for ACCOUNT_1, range proof RANGEPROOF and claim public key CLAIM_PUBKEY When miner MINER mines 13 new blocks - Then VN has scanned to height 45 - Then indexer IDX has scanned to height 45 + Then VN has scanned to height 55 + Then indexer IDX has scanned to height 55 When I convert commitment COMMITMENT into COMM_ADDRESS address Then validator node VN has state at COMM_ADDRESS within 20 seconds @@ -168,7 +168,7 @@ Feature: Account transfers When miner MINER mines 4 new blocks When wallet WALLET has at least 5000 T When validator node VN sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks + When miner MINER mines 26 new blocks Then the validator node VN is listed as registered # Initialize an indexer @@ -177,8 +177,8 @@ Feature: Account transfers # Initialize the wallet daemon Given a wallet daemon WALLET_D connected to indexer IDX - Then VN has scanned to height 17 - Then indexer IDX has scanned to height 17 + Then VN has scanned to height 27 + Then indexer IDX has scanned to height 27 # Create the sender account When I create an account ACC_1 via the wallet daemon WALLET_D with 10000 free coins diff --git a/integration_tests/tests/features/wallet_daemon.feature b/integration_tests/tests/features/wallet_daemon.feature index cc08fe4d8..b66294733 100644 --- a/integration_tests/tests/features/wallet_daemon.feature +++ b/integration_tests/tests/features/wallet_daemon.feature @@ -20,8 +20,8 @@ Feature: Wallet Daemon # VN registration When validator node VAL_1 sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks - Then VAL_1 has scanned to height 17 + When miner MINER mines 26 new blocks + Then VAL_1 has scanned to height 27 Then the validator node VAL_1 is listed as registered # Initialize an indexer @@ -35,8 +35,8 @@ Feature: Wallet Daemon # Mine some blocks until the UTXOs are scanned When miner MINER mines 5 new blocks - Then VAL_1 has scanned to height 22 - Then indexer IDX has scanned to height 22 + Then VAL_1 has scanned to height 32 + Then indexer IDX has scanned to height 32 Then the template "faucet" is listed as registered by the validator node VAL_1 # Create two accounts to test sending the tokens @@ -96,7 +96,7 @@ Feature: Wallet Daemon When miner MINER mines 4 new blocks When wallet WALLET has at least 5000 T When validator node VN sends a registration transaction to base wallet WALLET - When miner MINER mines 16 new blocks + When miner MINER mines 26 new blocks Then the validator node VN is listed as registered # Initialize an indexer @@ -114,7 +114,7 @@ Feature: Wallet Daemon # unfortunately have to wait for this to get into the mempool.... Then there is 1 transaction in the mempool of BASE within 10 seconds When miner MINER mines 13 new blocks - Then VN has scanned to height 30 + Then VN has scanned to height 40 When I convert commitment COMMITMENT into COMM_ADDRESS address Then validator node VN has state at COMM_ADDRESS within 20 seconds @@ -126,7 +126,7 @@ Feature: Wallet Daemon When I check the confidential balance of ACCOUNT_1 on wallet daemon WALLET_D the amount is at least 10000 # When account ACCOUNT_1 reveals 100 burned tokens via wallet daemon WALLET_D Then I make a confidential transfer with amount 5 from ACCOUNT_1 to ACCOUNT_2 creating output OUTPUT_TX1 via the wallet_daemon WALLET_D - + Scenario: Create and mint account NFT # Initialize a base node, wallet, miner and VN Given a network with registered validator VAL_1 and wallet daemon WALLET_D