Skip to content

Commit 617c605

Browse files
committed
Don't dump logs if node not present in test_case
1 parent ee319fb commit 617c605

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

src/framework.rs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,30 @@ impl TestFramework {
100100
}
101101

102102
fn get_nodes_as_log_provider(&self) -> Vec<&dyn LogPathProviderErased> {
103+
let test_case = &self.ctx.config.test_case;
104+
103105
self.ctx
104106
.config
105107
.bitcoin
106108
.iter()
107109
.map(LogPathProvider::as_erased)
110+
.map(Option::Some)
108111
.chain(vec![
109-
LogPathProvider::as_erased(&self.ctx.config.sequencer),
110-
LogPathProvider::as_erased(&self.ctx.config.full_node),
111-
LogPathProvider::as_erased(&self.ctx.config.batch_prover),
112-
LogPathProvider::as_erased(&self.ctx.config.light_client_prover),
112+
test_case
113+
.with_sequencer
114+
.then(|| LogPathProvider::as_erased(&self.ctx.config.sequencer)),
115+
test_case
116+
.with_full_node
117+
.then(|| LogPathProvider::as_erased(&self.ctx.config.full_node)),
118+
test_case
119+
.with_batch_prover
120+
.then(|| LogPathProvider::as_erased(&self.ctx.config.batch_prover)),
121+
test_case
122+
.with_light_client_prover
123+
.then(|| LogPathProvider::as_erased(&self.ctx.config.light_client_prover)),
113124
])
125+
.into_iter()
126+
.flatten()
114127
.collect()
115128
}
116129

0 commit comments

Comments
 (0)