Skip to content

Commit

Permalink
test/e2e: improve node ledger cmd detection
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic committed Sep 25, 2024
1 parent ba57011 commit 98ec685
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/tests/src/e2e/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,13 @@ where
Bin::Relayer => ("namadar", "info"),
};

let mut args = args.into_iter().peekable();
let is_node_ledger = matches!(bin, Bin::Node)
&& args
.peek()
.map(|fst_arg| fst_arg.as_ref() == "ledger")
.unwrap_or_default();

let mut run_cmd = generate_bin_command(
bin_name,
&working_dir.as_ref().join("Cargo.toml"),
Expand Down Expand Up @@ -1160,7 +1167,7 @@ where

println!("{}:\n{}", "> Running".underline().green(), &cmd_process);

if let Bin::Node = &bin {
if is_node_ledger {
// When running a node command, we need to wait a bit before checking
// status
sleep(1);
Expand Down

0 comments on commit 98ec685

Please sign in to comment.