Skip to content

Commit

Permalink
Don't dump logs if node not present in test_case
Browse files Browse the repository at this point in the history
  • Loading branch information
jfldde committed Oct 9, 2024
1 parent ee319fb commit 617c605
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions src/framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,30 @@ impl TestFramework {
}

fn get_nodes_as_log_provider(&self) -> Vec<&dyn LogPathProviderErased> {
let test_case = &self.ctx.config.test_case;

self.ctx
.config
.bitcoin
.iter()
.map(LogPathProvider::as_erased)
.map(Option::Some)
.chain(vec![
LogPathProvider::as_erased(&self.ctx.config.sequencer),
LogPathProvider::as_erased(&self.ctx.config.full_node),
LogPathProvider::as_erased(&self.ctx.config.batch_prover),
LogPathProvider::as_erased(&self.ctx.config.light_client_prover),
test_case
.with_sequencer
.then(|| LogPathProvider::as_erased(&self.ctx.config.sequencer)),
test_case
.with_full_node
.then(|| LogPathProvider::as_erased(&self.ctx.config.full_node)),
test_case
.with_batch_prover
.then(|| LogPathProvider::as_erased(&self.ctx.config.batch_prover)),
test_case
.with_light_client_prover
.then(|| LogPathProvider::as_erased(&self.ctx.config.light_client_prover)),
])
.into_iter()
.flatten()
.collect()
}

Expand Down

0 comments on commit 617c605

Please sign in to comment.