mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-06-12 14:41:06 +00:00
Fix tests & clear node directories before startup
This commit is contained in:
@@ -14,6 +14,7 @@ alloy = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
|
||||
revive-dt-common = { workspace = true }
|
||||
revive-dt-config = { workspace = true }
|
||||
revive-dt-format = { workspace = true }
|
||||
revive-dt-node-interaction = { workspace = true }
|
||||
|
||||
@@ -25,6 +25,7 @@ use alloy::{
|
||||
},
|
||||
signers::local::PrivateKeySigner,
|
||||
};
|
||||
use revive_dt_common::fs::clear_directory;
|
||||
use revive_dt_config::Arguments;
|
||||
use revive_dt_format::traits::ResolverApi;
|
||||
use revive_dt_node_interaction::EthereumNode;
|
||||
@@ -80,6 +81,9 @@ impl Instance {
|
||||
/// Create the node directory and call `geth init` to configure the genesis.
|
||||
#[tracing::instrument(skip_all, fields(geth_node_id = self.id))]
|
||||
fn init(&mut self, genesis: String) -> anyhow::Result<&mut Self> {
|
||||
clear_directory(&self.base_directory)?;
|
||||
clear_directory(&self.logs_directory)?;
|
||||
|
||||
create_dir_all(&self.base_directory)?;
|
||||
create_dir_all(&self.logs_directory)?;
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ use alloy::{
|
||||
},
|
||||
signers::local::PrivateKeySigner,
|
||||
};
|
||||
use revive_dt_common::fs::clear_directory;
|
||||
use revive_dt_format::traits::ResolverApi;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::{Value as JsonValue, json};
|
||||
@@ -85,6 +86,9 @@ impl KitchensinkNode {
|
||||
|
||||
#[tracing::instrument(skip_all, fields(kitchensink_node_id = self.id))]
|
||||
fn init(&mut self, genesis: &str) -> anyhow::Result<&mut Self> {
|
||||
clear_directory(&self.base_directory)?;
|
||||
clear_directory(&self.logs_directory)?;
|
||||
|
||||
create_dir_all(&self.base_directory)?;
|
||||
create_dir_all(&self.logs_directory)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user