Skip to content

Commit

Permalink
fix(testenv): correct ENV vars
Browse files Browse the repository at this point in the history
  • Loading branch information
storopoli committed Mar 25, 2024
1 parent c126d49 commit 488cdc3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/testenv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ pub struct TestEnv {
impl TestEnv {
/// Construct a new [`TestEnv`] instance with default configurations.
pub fn new() -> anyhow::Result<Self> {
let bitcoind = match std::env::var_os("BITCOIND_EXE") {
let bitcoind = match std::env::var_os("BITCOIND_EXEC") {
Some(bitcoind_path) => electrsd::bitcoind::BitcoinD::new(bitcoind_path),
None => {
let bitcoind_exe = electrsd::bitcoind::downloaded_exe_path()
.expect(
"you need to provide an env var BITCOIND_EXE or specify a bitcoind version feature",
"you need to provide an env var BITCOIND_EXEC or specify a bitcoind version feature",
);
electrsd::bitcoind::BitcoinD::with_conf(
bitcoind_exe,
Expand All @@ -36,7 +36,7 @@ impl TestEnv {

let mut electrsd_conf = electrsd::Conf::default();
electrsd_conf.http_enabled = true;
let electrsd = match std::env::var_os("ELECTRS_EXE") {
let electrsd = match std::env::var_os("ELECTRS_EXEC") {
Some(env_electrs_exe) => {
electrsd::ElectrsD::with_conf(env_electrs_exe, &bitcoind, &electrsd_conf)
}
Expand Down Expand Up @@ -64,7 +64,7 @@ impl TestEnv {
pub fn reset_electrsd(mut self) -> anyhow::Result<Self> {
let mut electrsd_conf = electrsd::Conf::default();
electrsd_conf.http_enabled = true;
let electrsd = match std::env::var_os("ELECTRS_EXE") {
let electrsd = match std::env::var_os("ELECTRS_EXEC") {
Some(env_electrs_exe) => {
electrsd::ElectrsD::with_conf(env_electrs_exe, &self.bitcoind, &electrsd_conf)
}
Expand Down

0 comments on commit 488cdc3

Please sign in to comment.