Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

fix: add setup and run on rpc tests #1161

Merged
merged 3 commits into from
Sep 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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