From 0606f2b3a78604b91c5bebe8781d2c6418a42975 Mon Sep 17 00:00:00 2001 From: jfldde <168934971+jfldde@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:17:58 +0100 Subject: [PATCH] Run bitcoind in docker by default --- src/config/test_case.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config/test_case.rs b/src/config/test_case.rs index 6a6c33b..8e1e921 100644 --- a/src/config/test_case.rs +++ b/src/config/test_case.rs @@ -98,8 +98,8 @@ pub struct TestCaseDockerConfig { impl Default for TestCaseDockerConfig { fn default() -> Self { TestCaseDockerConfig { - bitcoin: parse_bool_env("TEST_BITCOIN_DOCKER"), - citrea: parse_bool_env("TEST_CITREA_DOCKER"), + bitcoin: parse_bool_env("TEST_BITCOIN_DOCKER").unwrap_or(true), + citrea: parse_bool_env("TEST_CITREA_DOCKER").unwrap_or(false), } } } @@ -110,8 +110,8 @@ impl TestCaseDockerConfig { } } -pub fn parse_bool_env(key: &str) -> bool { +pub fn parse_bool_env(key: &str) -> Option { env::var(key) + .ok() .map(|v| &v == "1" || &v.to_lowercase() == "true") - .unwrap_or(false) }