From 0a551378b271c592a6cc8833c8dca282fea63ea7 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 23 Mar 2024 21:24:29 +0000 Subject: [PATCH] Fix indentation in `test_ln_peers` --- src/config.rs | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/src/config.rs b/src/config.rs index ae5b2d1..0941e78 100644 --- a/src/config.rs +++ b/src/config.rs @@ -367,26 +367,25 @@ mod tests { assert!(socket_address == "127.0.0.1:9735" || socket_address == "[::1]:9735"); } - #[test] - fn test_ln_peers() { - // Set the environment variable, including a repeated comma, leading space, and trailing comma. - std::env::set_var("LN_PEERS", "035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc226@170.75.163.209:9735,, 035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc227@170.75.163.210:9735,"); - let peers = ln_peers(); - - // Assert output is as expected - assert_eq!( - peers, - vec![ - ( - PublicKey::from_str("035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc226").unwrap(), - SocketAddr::from_str("170.75.163.209:9735").unwrap() - ), - ( - PublicKey::from_str("035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc227").unwrap(), - SocketAddr::from_str("170.75.163.210:9735").unwrap() - ) - ] - ); - } - + #[test] + fn test_ln_peers() { + // Set the environment variable, including a repeated comma, leading space, and trailing comma. + std::env::set_var("LN_PEERS", "035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc226@170.75.163.209:9735,, 035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc227@170.75.163.210:9735,"); + let peers = ln_peers(); + + // Assert output is as expected + assert_eq!( + peers, + vec![ + ( + PublicKey::from_str("035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc226").unwrap(), + SocketAddr::from_str("170.75.163.209:9735").unwrap() + ), + ( + PublicKey::from_str("035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc227").unwrap(), + SocketAddr::from_str("170.75.163.210:9735").unwrap() + ) + ] + ); + } } -- 2.39.5