From a1ad9f2f956864245cd85478fdaafd436313f9ab Mon Sep 17 00:00:00 2001 From: Omar Abdulla Date: Sun, 13 Jul 2025 23:05:21 +0300 Subject: [PATCH] Fix tests --- crates/node/src/geth.rs | 6 ++++-- crates/node/src/kitchensink.rs | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/node/src/geth.rs b/crates/node/src/geth.rs index 41c0327..0c0e153 100644 --- a/crates/node/src/geth.rs +++ b/crates/node/src/geth.rs @@ -283,8 +283,10 @@ impl Node for Instance { })?; } - // Remove the node's database so that subsequent runs do not run on the same database. - remove_dir_all(self.base_directory.join("data"))?; + // Remove the node's database so that subsequent runs do not run on the same database. We + // ignore the error just in case the directory didn't exist in the first place and therefore + // there's nothing to be deleted. + let _ = remove_dir_all(self.base_directory.join("data")); Ok(()) } diff --git a/crates/node/src/kitchensink.rs b/crates/node/src/kitchensink.rs index ec0ab13..48324b2 100644 --- a/crates/node/src/kitchensink.rs +++ b/crates/node/src/kitchensink.rs @@ -412,8 +412,10 @@ impl Node for KitchensinkNode { })?; } - // Remove the node's database so that subsequent runs do not run on the same database. - remove_dir_all(self.base_directory.join("chains"))?; + // Remove the node's database so that subsequent runs do not run on the same database. We + // ignore the error just in case the directory didn't exist in the first place and therefore + // there's nothing to be deleted. + let _ = remove_dir_all(self.base_directory.join("data")); Ok(()) }