]> git.bitcoin.ninja Git - rapid-gossip-sync-server/commitdiff
Fix indentation in `test_ln_peers`
authorMatt Corallo <git@bluematt.me>
Sat, 23 Mar 2024 21:24:29 +0000 (21:24 +0000)
committerMatt Corallo <git@bluematt.me>
Sat, 23 Mar 2024 21:26:13 +0000 (21:26 +0000)
src/config.rs

index ae5b2d116142b7c035f0af446a97f59ea446a680..0941e78953424e0619934a2ab02b4e91de170260 100644 (file)
@@ -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()
+                               )
+                       ]
+               );
+       }
 }