I am writing a new test and when I run this code, the println
's do not output in the terminal.
#[tokio::test]
async fn can_fetch_child_keys() {
if std::option_env!("TEST_WS").is_none() {
return
}
init_logger();
let child_keys = Builder::<Block>::new()
.mode(Mode::Online(OnlineConfig {
transport: std::option_env!("TEST_WS").unwrap().to_owned().into(),
pallets: vec!["Contracts".to_owned()],
child_trie: true,
..Default::default()
}))
.build()
.await
.unwrap()
.execute_with(|| {
let child_keys = sp_io::storage::next_key(&[]).expect("some key must exist in the snapshot");
assert!(sp_io::storage::get(&child_keys).is_some());
child_keys
});
assert!(child_keys.len() > 0);
println!("child_keys: {:?}", child_keys);
println!("👩‍👦 child_keys.len(): {:?}", child_keys.len());
}
I have tried using:
RUST_LOG=debug cargo test --features=remote-test -p frame-remote-externalities can_fetch_child_keys -- --nocapture
Any suggestions on how to output in the terminal for debugging purposes?
This is in specific to the tests found here: