Skip to content

Commit

Permalink
updated cucumber tests to reflect new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ksrichard committed Nov 11, 2024
1 parent 96da2a9 commit fe1efab
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 56 deletions.
1 change: 1 addition & 0 deletions integration_tests/src/base_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
12 changes: 6 additions & 6 deletions integration_tests/tests/features/claim_burn.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions integration_tests/tests/features/committee.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions integration_tests/tests/features/concurrency.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions integration_tests/tests/features/counter.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions integration_tests/tests/features/epoch_change.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions integration_tests/tests/features/fungible.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@concurrent
@fungible
Feature: Fungible tokens

Scenario: Mint fungible tokens

##### Setup
Expand All @@ -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
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions integration_tests/tests/features/indexer.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions integration_tests/tests/features/nft.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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


Expand Down
10 changes: 5 additions & 5 deletions integration_tests/tests/features/state_sync.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions integration_tests/tests/features/substates.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
22 changes: 11 additions & 11 deletions integration_tests/tests/features/transfer.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading

0 comments on commit fe1efab

Please sign in to comment.