We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83d05d2 commit 936456aCopy full SHA for 936456a
src/config/test_case.rs
@@ -98,8 +98,8 @@ pub struct TestCaseDockerConfig {
98
impl Default for TestCaseDockerConfig {
99
fn default() -> Self {
100
TestCaseDockerConfig {
101
- bitcoin: parse_bool_env("TEST_BITCOIN_DOCKER"),
102
- 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),
103
}
104
105
@@ -110,8 +110,8 @@ impl TestCaseDockerConfig {
110
111
112
113
-pub fn parse_bool_env(key: &str) -> bool {
+pub fn parse_bool_env(key: &str) -> Option<bool> {
114
env::var(key)
115
+ .ok()
116
.map(|v| &v == "1" || &v.to_lowercase() == "true")
- .unwrap_or(false)
117
0 commit comments