From 29cda0a07b00458742b6a50628df55495e65ff06 Mon Sep 17 00:00:00 2001 From: Rafael Cardenas Date: Mon, 11 Nov 2024 15:41:27 -0600 Subject: [PATCH] fix: tests --- components/chainhook-cli/src/scan/stacks.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/components/chainhook-cli/src/scan/stacks.rs b/components/chainhook-cli/src/scan/stacks.rs index ebcae0d7..5c62fdef 100644 --- a/components/chainhook-cli/src/scan/stacks.rs +++ b/components/chainhook-cli/src/scan/stacks.rs @@ -588,13 +588,16 @@ pub async fn import_stacks_chainstate_from_remote_tsv( config: &mut Config, ctx: &Context, ) -> Result<(), String> { - if !config.is_cache_path_empty()? { - try_info!(ctx, "A Stacks chainstate already exists, skipping TSV chainstante import"); - return Ok(()); - } - if !config.contains_remote_stacks_tsv_url() { - try_info!(ctx, "No remote Stacks TSV location was specified in config file, skipping TSV chainstante import"); - return Ok(()); + #[cfg(not(test))] + { + if !config.is_cache_path_empty()? { + try_info!(ctx, "A Stacks chainstate already exists, skipping TSV chainstante import"); + return Ok(()); + } + if !config.contains_remote_stacks_tsv_url() { + try_info!(ctx, "No remote Stacks TSV location was specified in config file, skipping TSV chainstante import"); + return Ok(()); + } } try_info!(ctx, "Importing Stacks chainstate from TSV");