Skip to content

Commit

Permalink
Fixes e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grarco committed Jun 14, 2023
1 parent b752e7d commit 3f75477
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 48 deletions.
22 changes: 20 additions & 2 deletions tests/src/e2e/ibc_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,28 @@ fn setup_two_single_node_nets() -> Result<(Test, Test)> {
// epoch per 100 seconds
let update_genesis = |mut genesis: GenesisConfig| {
genesis.parameters.epochs_per_year = 315_360;
*genesis
.token
.get_mut(NAM)
.unwrap()
.balances
.as_mut()
.unwrap()
.get_mut(ALBERT)
.unwrap() = 10000000;
genesis
};
let update_genesis_b = |mut genesis: GenesisConfig| {
genesis.parameters.epochs_per_year = 315_360;
*genesis
.token
.get_mut(NAM)
.unwrap()
.balances
.as_mut()
.unwrap()
.get_mut(ALBERT)
.unwrap() = 10000000;
setup::set_validators(1, genesis, |_| setup::ANOTHER_CHAIN_PORT_OFFSET)
};
Ok((
Expand Down Expand Up @@ -766,7 +784,7 @@ fn transfer_received_token(
"--amount",
"50000",
"--gas-limit",
"100",
"50",
"--fee-token",
NAM,
"--node",
Expand Down Expand Up @@ -981,7 +999,7 @@ fn submit_ibc_tx(
"--signer",
signer,
"--gas-limit",
"100",
"40",
"--fee-token",
NAM,
"--node",
Expand Down
73 changes: 27 additions & 46 deletions tests/src/e2e/ledger_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ fn ledger_txs_and_queries() -> Result<()> {
"--amount",
"10.1",
"--gas-limit",
"100",
"40",
"--node",
&validator_one_rpc,
],
Expand All @@ -400,7 +400,7 @@ fn ledger_txs_and_queries() -> Result<()> {
"--amount",
"10.1",
"--gas-limit",
"100",
"40",
"--node",
&validator_one_rpc,
],
Expand All @@ -413,7 +413,7 @@ fn ledger_txs_and_queries() -> Result<()> {
"--code-path",
VP_USER_WASM,
"--gas-limit",
"100",
"40",
"--node",
&validator_one_rpc,
],
Expand All @@ -427,7 +427,7 @@ fn ledger_txs_and_queries() -> Result<()> {
"--data-path",
&tx_data_path,
"--gas-limit",
"100",
"40",
"--node",
&validator_one_rpc
],
Expand All @@ -444,7 +444,7 @@ fn ledger_txs_and_queries() -> Result<()> {
"--alias",
"Test-Account",
"--gas-limit",
"100",
"40",
"--node",
&validator_one_rpc,
],
Expand All @@ -464,7 +464,7 @@ fn ledger_txs_and_queries() -> Result<()> {
"--signer",
ALBERT,
"--gas-limit",
"100",
"40",
"--node",
&validator_one_rpc,
],
Expand Down Expand Up @@ -581,25 +581,6 @@ fn wrapper_fee_unshielding() -> Result<()> {
let validator_one_rpc = get_actor_rpc(&test, &Who::Validator(0));

let txs_args = [
(
vec![
// 0. Remove some tokens from Albert's balance
"transfer",
"--source",
ALBERT,
"--target",
BERTHA,
"--token",
NAM,
"--amount",
"1",
"--gas-limit",
"30",
"--ledger-address",
&validator_one_rpc,
],
"Transaction is valid",
),
(
vec![
// 1. Shield some tokens
Expand All @@ -613,7 +594,7 @@ fn wrapper_fee_unshielding() -> Result<()> {
"--amount",
"50000",
"--gas-limit",
"100",
"40",
"--ledger-address",
&validator_one_rpc,
],
Expand All @@ -638,7 +619,7 @@ fn wrapper_fee_unshielding() -> Result<()> {
"--ledger-address",
&validator_one_rpc,
],
"Error in fee unshielding",
"Insufficient transparent balance",
),
// 3. Valid unshielding
(
Expand All @@ -653,7 +634,7 @@ fn wrapper_fee_unshielding() -> Result<()> {
"--amount",
"1",
"--gas-limit",
"1",
"40",
"--fee-spending-key",
A_SPENDING_KEY,
"--ledger-address",
Expand Down Expand Up @@ -1217,7 +1198,7 @@ fn masp_incentives() -> Result<()> {
"--amount",
"20",
"--gas-limit",
"100",
"40",
"--node",
&validator_one_rpc
],
Expand Down Expand Up @@ -1411,7 +1392,7 @@ fn masp_incentives() -> Result<()> {
"--amount",
"30",
"--gas-limit",
"100",
"40",
"--node",
&validator_one_rpc
],
Expand Down Expand Up @@ -1541,7 +1522,7 @@ fn masp_incentives() -> Result<()> {
"--signer",
BERTHA,
"--gas-limit",
"150",
"40",
"--node",
&validator_one_rpc
],
Expand Down Expand Up @@ -1635,7 +1616,7 @@ fn masp_incentives() -> Result<()> {
"--signer",
ALBERT,
"--gas-limit",
"150",
"40",
"--node",
&validator_one_rpc
],
Expand Down Expand Up @@ -1795,7 +1776,7 @@ fn masp_incentives() -> Result<()> {
"--signer",
BERTHA,
"--gas-limit",
"150",
"40",
"--node",
&validator_one_rpc
],
Expand Down Expand Up @@ -1824,7 +1805,7 @@ fn masp_incentives() -> Result<()> {
"--signer",
ALBERT,
"--gas-limit",
"100",
"40",
"--node",
&validator_one_rpc
],
Expand Down Expand Up @@ -2780,7 +2761,7 @@ fn proposal_submission() -> Result<()> {
"--amount",
"900",
"--gas-limit",
"100",
"40",
"--node",
&validator_one_rpc,
];
Expand All @@ -2807,7 +2788,7 @@ fn proposal_submission() -> Result<()> {
"--data-path",
valid_proposal_json_path.to_str().unwrap(),
"--gas-limit",
"100",
"40",
"--node",
&validator_one_rpc,
];
Expand Down Expand Up @@ -2910,7 +2891,7 @@ fn proposal_submission() -> Result<()> {
"--data-path",
invalid_proposal_json_path.to_str().unwrap(),
"--gas-limit",
"100",
"40",
"--node",
&validator_one_rpc,
];
Expand Down Expand Up @@ -2966,7 +2947,7 @@ fn proposal_submission() -> Result<()> {
"--signer",
"validator-0",
"--gas-limit",
"100",
"40",
"--node",
&validator_one_rpc,
];
Expand All @@ -2990,7 +2971,7 @@ fn proposal_submission() -> Result<()> {
"--signer",
BERTHA,
"--gas-limit",
"100",
"40",
"--node",
&validator_one_rpc,
];
Expand All @@ -3010,7 +2991,7 @@ fn proposal_submission() -> Result<()> {
"--signer",
ALBERT,
"--gas-limit",
"100",
"40",
"--node",
&validator_one_rpc,
];
Expand Down Expand Up @@ -3366,7 +3347,7 @@ fn pgf_governance_proposal() -> Result<()> {
"--amount",
"900",
"--gas-limit",
"150",
"40",
"--ledger-address",
&validator_one_rpc,
];
Expand All @@ -3385,7 +3366,7 @@ fn pgf_governance_proposal() -> Result<()> {
"--data-path",
valid_proposal_json_path.to_str().unwrap(),
"--gas-limit",
"150",
"40",
"--ledger-address",
&validator_one_rpc,
];
Expand All @@ -3403,7 +3384,7 @@ fn pgf_governance_proposal() -> Result<()> {
"--data-path",
valid_proposal_json_path.to_str().unwrap(),
"--gas-limit",
"150",
"40",
"--ledger-address",
&validator_one_rpc,
];
Expand Down Expand Up @@ -3487,7 +3468,7 @@ fn pgf_governance_proposal() -> Result<()> {
"--signer",
"validator-0",
"--gas-limit",
"150",
"40",
"--ledger-address",
&validator_one_rpc,
];
Expand Down Expand Up @@ -3515,7 +3496,7 @@ fn pgf_governance_proposal() -> Result<()> {
"--signer",
BERTHA,
"--gas-limit",
"150",
"40",
"--ledger-address",
&validator_one_rpc,
];
Expand All @@ -3536,7 +3517,7 @@ fn pgf_governance_proposal() -> Result<()> {
"--signer",
BERTHA,
"--gas-limit",
"150",
"40",
"--ledger-address",
&validator_one_rpc,
];
Expand Down

0 comments on commit 3f75477

Please sign in to comment.