Skip to content

Commit 670d0c0

Browse files
committed
fix test_get_listen_ip integration test
Signed-off-by: Erik Hollensbe <git@hollensbe.org>
1 parent a101e32 commit 670d0c0

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

tests/integration.rs

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,12 @@ async fn test_get_listen_ip() -> Result<(), anyhow::Error> {
704704
.unwrap();
705705
ips.sort();
706706

707-
let mut listen_ips =
708-
get_listen_ips(&authtoken_path(None), &tn.network.clone().id.unwrap()).await?;
707+
let mut listen_ips: Vec<String> =
708+
get_listen_ips(&authtoken_path(None), &tn.network.clone().id.unwrap())
709+
.await?
710+
.iter()
711+
.map(|x| parse_ip_from_cidr(x.clone()).to_string())
712+
.collect();
709713
listen_ips.sort();
710714

711715
assert_eq!(listen_ips, ips);
@@ -715,8 +719,12 @@ async fn test_get_listen_ip() -> Result<(), anyhow::Error> {
715719
.await
716720
.unwrap();
717721

718-
let mut listen_ips =
719-
get_listen_ips(&authtoken_path(None), &tn.network.clone().id.unwrap()).await?;
722+
let mut listen_ips: Vec<String> =
723+
get_listen_ips(&authtoken_path(None), &tn.network.clone().id.unwrap())
724+
.await?
725+
.iter()
726+
.map(|x| parse_ip_from_cidr(x.clone()).to_string())
727+
.collect();
720728
listen_ips.sort();
721729

722730
let mut ips = vec![tn.member().clone().rfc4193()?.ip().to_string()];
@@ -731,8 +739,12 @@ async fn test_get_listen_ip() -> Result<(), anyhow::Error> {
731739
.await
732740
.unwrap();
733741

734-
let mut listen_ips =
735-
get_listen_ips(&authtoken_path(None), &tn.network.clone().id.unwrap()).await?;
742+
let mut listen_ips: Vec<String> =
743+
get_listen_ips(&authtoken_path(None), &tn.network.clone().id.unwrap())
744+
.await?
745+
.iter()
746+
.map(|x| parse_ip_from_cidr(x.clone()).to_string())
747+
.collect();
736748
listen_ips.sort();
737749

738750
let mut ips = vec![tn.member().clone().sixplane()?.ip().to_string()];

0 commit comments

Comments
 (0)