mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-03 22:34:21 +01:00
pytest: Add a test for the cln-plugin logging integration
This commit is contained in:
committed by
Rusty Russell
parent
f5e1829117
commit
fe21b89b56
@@ -6,9 +6,10 @@ use tokio;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), anyhow::Error> {
|
||||
env_logger::init();
|
||||
|
||||
let (plugin, stdin) = Builder::new((), tokio::io::stdin(), tokio::io::stdout()).build();
|
||||
plugin.run(stdin).await;
|
||||
Ok(())
|
||||
tokio::spawn(async {
|
||||
tokio::time::sleep(tokio::time::Duration::from_millis(1000)).await;
|
||||
log::info!("Hello world");
|
||||
});
|
||||
plugin.run(stdin).await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user