Skip to content

Commit

Permalink
Run bitcoind in docker by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jfldde committed Dec 16, 2024
1 parent efde07d commit 0606f2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/config/test_case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
}
}
Expand All @@ -110,8 +110,8 @@ impl TestCaseDockerConfig {
}
}

pub fn parse_bool_env(key: &str) -> bool {
pub fn parse_bool_env(key: &str) -> Option<bool> {
env::var(key)
.ok()
.map(|v| &v == "1" || &v.to_lowercase() == "true")
.unwrap_or(false)
}

0 comments on commit 0606f2b

Please sign in to comment.