Skip to content

Commit

Permalink
fix: add setup and run on rpc tests (keep-starknet-strange#1161)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-roak authored Sep 30, 2023
1 parent 042e4c3 commit 36ce614
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Next release

- fix: add setup and run for rpc tests
- fix: fix clap for run command
- fix: add `madara_path` flag for setup command
- fix: add official references to configs files
Expand Down
8 changes: 8 additions & 0 deletions starknet-rpc-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ impl MadaraClient {

let madara_log = std::env::var("MADARA_LOG").unwrap_or_else(|_| "false".to_string());

Command::new("cargo")
.stdout(Stdio::null())
.stderr(if madara_log == "true" { Stdio::inherit() } else { Stdio::null() })
.args(["run", "--release", "--", "setup"])
.spawn()
.expect("Could not setup madara node");

let child_handle = Command::new("cargo")
// Silence Madara stdout and stderr
.stdout(Stdio::null())
Expand All @@ -177,6 +184,7 @@ impl MadaraClient {
"run",
"--release",
"--",
"run",
"--sealing=manual",
&format!("--execution={execution}"),
"--dev",
Expand Down

0 comments on commit 36ce614

Please sign in to comment.