Skip to content

Commit

Permalink
Fix regex for valid tx in e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sug0 committed Sep 13, 2022
1 parent 70997a1 commit d8a7d6a
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions tests/src/e2e/ledger_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fn test_node_connectivity() -> Result<()> {
&validator_one_rpc,
];
let mut client = run!(test, Bin::Client, tx_args, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

// 3. Check that all the nodes processed the tx with the same result
Expand Down Expand Up @@ -344,7 +344,7 @@ fn ledger_txs_and_queries() -> Result<()> {
client.exp_string("Transaction accepted")?;
client.exp_string("Transaction applied")?;
}
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();
}
}
Expand Down Expand Up @@ -588,7 +588,7 @@ fn pos_bonds() -> Result<()> {
];
let mut client =
run_as!(test, Who::Validator(0), Bin::Client, tx_args, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

// 3. Submit a delegation to the genesis validator
Expand All @@ -610,7 +610,7 @@ fn pos_bonds() -> Result<()> {
&validator_one_rpc,
];
let mut client = run!(test, Bin::Client, tx_args, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

// 4. Submit an unbond of the self-bond
Expand All @@ -631,7 +631,7 @@ fn pos_bonds() -> Result<()> {
];
let mut client =
run_as!(test, Who::Validator(0), Bin::Client, tx_args, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

// 5. Submit an unbond of the delegation
Expand All @@ -653,7 +653,7 @@ fn pos_bonds() -> Result<()> {
&validator_one_rpc,
];
let mut client = run!(test, Bin::Client, tx_args, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

// 6. Wait for the unbonding epoch
Expand Down Expand Up @@ -694,7 +694,7 @@ fn pos_bonds() -> Result<()> {
];
let mut client =
run_as!(test, Who::Validator(0), Bin::Client, tx_args, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

// 8. Submit a withdrawal of the delegation
Expand All @@ -714,7 +714,7 @@ fn pos_bonds() -> Result<()> {
&validator_one_rpc,
];
let mut client = run!(test, Bin::Client, tx_args, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

Ok(())
Expand Down Expand Up @@ -783,7 +783,7 @@ fn pos_init_validator() -> Result<()> {
&validator_one_rpc,
];
let mut client = run!(test, Bin::Client, tx_args, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

// 3. Submit a delegation to the new validator
Expand All @@ -808,7 +808,7 @@ fn pos_init_validator() -> Result<()> {
&validator_one_rpc,
];
let mut client = run!(test, Bin::Client, tx_args, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();
// Then self-bond the tokens:
let tx_args = vec![
Expand All @@ -829,7 +829,7 @@ fn pos_init_validator() -> Result<()> {
&validator_one_rpc,
];
let mut client = run!(test, Bin::Client, tx_args, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

// 4. Transfer some XAN to the new validator
Expand All @@ -853,7 +853,7 @@ fn pos_init_validator() -> Result<()> {
&validator_one_rpc,
];
let mut client = run!(test, Bin::Client, tx_args, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

// 5. Submit a self-bond for the new validator
Expand All @@ -873,7 +873,7 @@ fn pos_init_validator() -> Result<()> {
&validator_one_rpc,
];
let mut client = run!(test, Bin::Client, tx_args, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

// 6. Wait for the pipeline epoch when the validator's voting power should
Expand Down Expand Up @@ -963,7 +963,7 @@ fn ledger_many_txs_in_a_block() -> Result<()> {
let mut client = run!(*test, Bin::Client, args, Some(40))?;
client.exp_string("Transaction accepted")?;
client.exp_string("Transaction applied")?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();
let res: Result<()> = Ok(());
res
Expand Down Expand Up @@ -1032,7 +1032,7 @@ fn proposal_submission() -> Result<()> {
&validator_one_rpc,
];
let mut client = run!(test, Bin::Client, tx_args, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

// 2. Submit valid proposal
Expand Down Expand Up @@ -1077,7 +1077,7 @@ fn proposal_submission() -> Result<()> {
&validator_one_rpc,
];
let mut client = run!(test, Bin::Client, submit_proposal_args, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

// 3. Query the proposal
Expand Down Expand Up @@ -1233,7 +1233,7 @@ fn proposal_submission() -> Result<()> {
submit_proposal_vote,
Some(15)
)?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

let submit_proposal_vote_delagator = vec![
Expand All @@ -1250,7 +1250,7 @@ fn proposal_submission() -> Result<()> {

let mut client =
run!(test, Bin::Client, submit_proposal_vote_delagator, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

// 10. Send a yay vote from a non-validator/non-delegator user
Expand All @@ -1269,7 +1269,7 @@ fn proposal_submission() -> Result<()> {
// this is valid because the client filter ALBERT delegation and there are
// none
let mut client = run!(test, Bin::Client, submit_proposal_vote, Some(15))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

// 11. Query the proposal and check the result
Expand Down Expand Up @@ -1379,7 +1379,7 @@ fn proposal_offline() -> Result<()> {
&validator_one_rpc,
];
let mut client = run!(test, Bin::Client, tx_args, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

// 2. Create an offline proposal
Expand Down Expand Up @@ -1839,7 +1839,7 @@ fn test_genesis_validators() -> Result<()> {
];
let mut client =
run_as!(test, Who::Validator(0), Bin::Client, tx_args, Some(40))?;
client.exp_string("Transaction is valid.")?;
client.exp_string("Transaction added to mempool:")?;
client.assert_success();

// 3. Check that all the nodes processed the tx with the same result
Expand Down

0 comments on commit d8a7d6a

Please sign in to comment.