Skip to content

Commit 25bfe3d

Browse files
committed
mina-node-testing: add command to list all available scenarios
1 parent 19c6f80 commit 25bfe3d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

node/testing/src/main.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pub enum Command {
2424

2525
ScenariosGenerate(CommandScenariosGenerate),
2626
ScenariosRun(CommandScenariosRun),
27+
ScenariosList(CommandScenariosList),
2728
}
2829

2930
#[derive(Debug, clap::Args)]
@@ -57,6 +58,9 @@ pub struct CommandScenariosRun {
5758
pub name: String,
5859
}
5960

61+
#[derive(Debug, clap::Args)]
62+
pub struct CommandScenariosList {}
63+
6064
impl Command {
6165
pub fn run(self) -> Result<(), crate::CommandError> {
6266
let rt = setup();
@@ -155,6 +159,13 @@ impl Command {
155159
}
156160
})
157161
}
162+
Self::ScenariosList(_) => {
163+
println!("Available scenarios:");
164+
for scenario in Scenarios::iter() {
165+
println!(" {}", scenario.to_str())
166+
}
167+
Ok(())
168+
}
158169
}
159170
}
160171
}

0 commit comments

Comments
 (0)