From 36ce614204a1919bc61b7c72d657abedcb7d02ab Mon Sep 17 00:00:00 2001 From: Oak <5263301+d-roak@users.noreply.github.com> Date: Sun, 1 Oct 2023 08:31:11 +0900 Subject: [PATCH] fix: add setup and run on rpc tests (#1161) --- CHANGELOG.md | 1 + starknet-rpc-test/src/lib.rs | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7093332952..dd43a3d7bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/starknet-rpc-test/src/lib.rs b/starknet-rpc-test/src/lib.rs index b744a5dc0a..c4f4a1e6fe 100644 --- a/starknet-rpc-test/src/lib.rs +++ b/starknet-rpc-test/src/lib.rs @@ -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()) @@ -177,6 +184,7 @@ impl MadaraClient { "run", "--release", "--", + "run", "--sealing=manual", &format!("--execution={execution}"), "--dev",