From fbdc34435d55d2d46b0577f5b63cbe337a1b23f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Zemanovi=C4=8D?= Date: Tue, 24 Sep 2024 11:20:24 +0100 Subject: [PATCH] test/e2e/run_ledger: add a run via `namada` bin --- crates/tests/src/e2e/ledger_tests.rs | 14 +++++++++----- crates/tests/src/e2e/setup.rs | 4 +++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/crates/tests/src/e2e/ledger_tests.rs b/crates/tests/src/e2e/ledger_tests.rs index dceed2b2ac..f7a0c8e727 100644 --- a/crates/tests/src/e2e/ledger_tests.rs +++ b/crates/tests/src/e2e/ledger_tests.rs @@ -102,20 +102,24 @@ fn run_ledger() -> Result<()> { None, ); - let cmd_combinations = vec![vec!["ledger"], vec!["ledger", "run"]]; + let cmd_combinations = vec![ + (Bin::Node, vec!["ledger"]), + (Bin::Node, vec!["ledger", "run"]), + (Bin::Namada, vec!["node", "ledger"]), + ]; // Start the ledger as a validator - for args in &cmd_combinations { + for (bin, args) in &cmd_combinations { let mut ledger = - run_as!(test, Who::Validator(0), Bin::Node, args, Some(40))?; + run_as!(test, Who::Validator(0), *bin, args, Some(40))?; ledger.exp_string(LEDGER_STARTED)?; ledger.exp_string(VALIDATOR_NODE)?; } // Start the ledger as a non-validator - for args in &cmd_combinations { + for (bin, args) in &cmd_combinations { let mut ledger = - run_as!(test, Who::NonValidator, Bin::Node, args, Some(40))?; + run_as!(test, Who::NonValidator, *bin, args, Some(40))?; ledger.exp_string(LEDGER_STARTED)?; ledger.exp_string(NON_VALIDATOR_NODE)?; } diff --git a/crates/tests/src/e2e/setup.rs b/crates/tests/src/e2e/setup.rs index b9b709a913..5e48270bfd 100644 --- a/crates/tests/src/e2e/setup.rs +++ b/crates/tests/src/e2e/setup.rs @@ -605,13 +605,14 @@ pub fn network( } /// Namada binaries -#[derive(Debug)] +#[derive(Debug, Clone, Copy)] #[allow(dead_code)] pub enum Bin { Node, Client, Wallet, Relayer, + Namada, } #[derive(Debug)] @@ -1092,6 +1093,7 @@ where { // Root cargo workspace manifest path let (bin_name, log_level) = match bin { + Bin::Namada => ("namada", "info"), Bin::Node => ("namadan", "info"), Bin::Client => ("namadac", "tendermint_rpc=debug"), Bin::Wallet => ("namadaw", "info"),