Skip to content

Commit cde778f

Browse files
committed
(fix/testing-framework): allow webrtc option from command line
1 parent fce321e commit cde778f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

node/testing/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ pub struct CommandScenariosGenerate {
4040
pub name: Option<String>,
4141
#[arg(long, short)]
4242
pub use_debugger: bool,
43+
#[arg(long, short)]
44+
pub webrtc: bool,
4345
}
4446

4547
/// Run scenario located at `res/scenarios`.
@@ -83,6 +85,9 @@ impl Command {
8385
if cmd.use_debugger {
8486
config.use_debugger();
8587
}
88+
if cmd.webrtc {
89+
config.set_all_rust_to_rust_use_webrtc();
90+
}
8691
Ok(scenario.run_only_from_scratch(config))
8792
};
8893
let fut = async move {

node/testing/src/scenarios/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl Scenarios {
131131
Self::SimulationSmall(_) => true,
132132
Self::SimulationSmallForeverRealTime(_) => true,
133133
Self::MultiNodePubsubPropagateBlock(_) => true, // in progress
134-
Self::P2pSignaling(_) => cfg!(feature = "p2p-webrtc"),
134+
Self::P2pSignaling(_) => !cfg!(feature = "p2p-webrtc"),
135135
_ => false,
136136
}
137137
}

0 commit comments

Comments
 (0)