Skip to content

Commit

Permalink
fix test_get_listen_ip integration test
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Hollensbe <git@hollensbe.org>
  • Loading branch information
erikh committed Apr 2, 2022
1 parent a101e32 commit 670d0c0
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,12 @@ async fn test_get_listen_ip() -> Result<(), anyhow::Error> {
.unwrap();
ips.sort();

let mut listen_ips =
get_listen_ips(&authtoken_path(None), &tn.network.clone().id.unwrap()).await?;
let mut listen_ips: Vec<String> =
get_listen_ips(&authtoken_path(None), &tn.network.clone().id.unwrap())
.await?
.iter()
.map(|x| parse_ip_from_cidr(x.clone()).to_string())
.collect();
listen_ips.sort();

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

let mut listen_ips =
get_listen_ips(&authtoken_path(None), &tn.network.clone().id.unwrap()).await?;
let mut listen_ips: Vec<String> =
get_listen_ips(&authtoken_path(None), &tn.network.clone().id.unwrap())
.await?
.iter()
.map(|x| parse_ip_from_cidr(x.clone()).to_string())
.collect();
listen_ips.sort();

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

let mut listen_ips =
get_listen_ips(&authtoken_path(None), &tn.network.clone().id.unwrap()).await?;
let mut listen_ips: Vec<String> =
get_listen_ips(&authtoken_path(None), &tn.network.clone().id.unwrap())
.await?
.iter()
.map(|x| parse_ip_from_cidr(x.clone()).to_string())
.collect();
listen_ips.sort();

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

0 comments on commit 670d0c0

Please sign in to comment.