From 79d080f5637ede3499cafe2ce816b2473188cf71 Mon Sep 17 00:00:00 2001 From: idky137 Date: Fri, 26 Jul 2024 14:59:55 +0100 Subject: [PATCH] fixed connect_to_no_get_info test --- integration-tests/tests/integrations.rs | 51 ++++++++++--------------- 1 file changed, 20 insertions(+), 31 deletions(-) diff --git a/integration-tests/tests/integrations.rs b/integration-tests/tests/integrations.rs index 5015cfd..068fbfc 100644 --- a/integration-tests/tests/integrations.rs +++ b/integration-tests/tests/integrations.rs @@ -11,37 +11,26 @@ use zingoproxy_testutils::{ mod wallet_basic { use super::*; - // TODO: update not using GrpcConnector(using zingolib::lightclient). removed to simplify dependency tree. - // #[tokio::test] - // async fn connect_to_node_get_info() { - // let online = Arc::new(AtomicBool::new(true)); - // let (test_manager, regtest_handler, _proxy_handler) = - // TestManager::launch(online.clone()).await; - - // println!( - // "@zingoproxytest: Attempting to connect to GRPC server at URI: {}.", - // test_manager.get_proxy_uri() - // ); - // let mut client = GrpcConnector::new(test_manager.get_proxy_uri()) - // .get_client() - // .await - // .expect("Failed to create GRPC client"); - // let lightd_info = client - // .get_lightd_info(zcash_client_backend::proto::service::Empty {}) - // .await - // .expect("Failed to retrieve lightd info from GRPC server"); - - // println!( - // "@zingoproxytest: Lightd_info response:\n{:#?}.", - // lightd_info.into_inner() - // ); - // drop_test_manager( - // Some(test_manager.temp_conf_dir.path().to_path_buf()), - // regtest_handler, - // online, - // ) - // .await; - // } + #[tokio::test] + async fn connect_to_node_get_info() { + let online = Arc::new(AtomicBool::new(true)); + let (test_manager, regtest_handler, _proxy_handler) = + TestManager::launch(online.clone()).await; + let zingo_client = test_manager.build_lightclient().await; + + let lightd_info = zingo_client.do_info().await; + println!( + "@zingoproxytest: Lightd_info response:\n{:#?}.", + lightd_info + ); + + drop_test_manager( + Some(test_manager.temp_conf_dir.path().to_path_buf()), + regtest_handler, + online, + ) + .await; + } #[tokio::test] async fn send_to_orchard() {