Skip to content

Commit 936456a

Browse files
authored
Run bitcoind in docker by default (#63)
1 parent 83d05d2 commit 936456a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/config/test_case.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ pub struct TestCaseDockerConfig {
9898
impl Default for TestCaseDockerConfig {
9999
fn default() -> Self {
100100
TestCaseDockerConfig {
101-
bitcoin: parse_bool_env("TEST_BITCOIN_DOCKER"),
102-
citrea: parse_bool_env("TEST_CITREA_DOCKER"),
101+
bitcoin: parse_bool_env("TEST_BITCOIN_DOCKER").unwrap_or(true),
102+
citrea: parse_bool_env("TEST_CITREA_DOCKER").unwrap_or(false),
103103
}
104104
}
105105
}
@@ -110,8 +110,8 @@ impl TestCaseDockerConfig {
110110
}
111111
}
112112

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

0 commit comments

Comments
 (0)