From 1a80de19795b78e36cb7c00fad94f32e6e2b37e3 Mon Sep 17 00:00:00 2001 From: Riccardo Casatta Date: Mon, 5 Sep 2022 12:33:42 +0200 Subject: [PATCH] tests: use bitcoind::exe_path() instead of custom logic this allows to also check for bitcoind in path --- src/lib.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 6e2846d..119fa7a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -429,13 +429,7 @@ mod test { fn init() -> (String, String) { let _ = env_logger::try_init(); - let bitcoind_exe_path = if let Ok(env_bitcoind_exe) = env::var("BITCOIND_EXE") { - env_bitcoind_exe - } else if let Ok(downloaded_exe_path) = bitcoind::downloaded_exe_path() { - downloaded_exe_path - } else { - panic!("when no version feature is specified, you must specify BITCOIND_EXE env var") - }; + let bitcoind_exe_path = bitcoind::exe_path().unwrap(); let electrs_exe_path = if let Ok(env_electrs_exe) = env::var("ELECTRS_EXE") { env_electrs_exe } else if let Some(downloaded_exe_path) = crate::downloaded_exe_path() {