Skip to content

Commit aabe23c

Browse files
..
1 parent 4ff6834 commit aabe23c

File tree

2 files changed

+34
-28
lines changed

2 files changed

+34
-28
lines changed

dpd-client/tests/integration_tests/mcast.rs

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3861,33 +3861,35 @@ async fn test_multicast_group_id_recycling() -> TestResult {
38613861
group_ip: group_ip1,
38623862
tag: Some("recycling_test_1".to_string()),
38633863
nat_target: nat_target.clone(),
3864-
vlan_id: 10,
3864+
vlan_id: Some(10),
38653865
sources: None,
3866-
ports: vec![],
38673866
};
38683867

38693868
let created_group1 = switch
3869+
.client
38703870
.multicast_group_create_external(&external_create1)
3871-
.await?;
3871+
.await?
3872+
.into_inner();
38723873

38733874
let first_external_id = created_group1.external_group_id;
38743875
let first_underlay_id = created_group1.underlay_group_id;
38753876

3876-
switch.multicast_group_delete(&group_ip1).await?;
3877+
switch.client.multicast_group_delete(&group_ip1).await?;
38773878

38783879
let group_ip2 = IpAddr::V4(Ipv4Addr::new(224, 0, 0, 100));
38793880
let external_create2 = types::MulticastGroupCreateExternalEntry {
38803881
group_ip: group_ip2,
38813882
tag: Some("recycling_test_2".to_string()),
38823883
nat_target: nat_target.clone(),
3883-
vlan_id: 10,
3884+
vlan_id: Some(10),
38843885
sources: None,
3885-
ports: vec![],
38863886
};
38873887

38883888
let created_group2 = switch
3889+
.client
38893890
.multicast_group_create_external(&external_create2)
3890-
.await?;
3891+
.await?
3892+
.into_inner();
38913893

38923894
assert!(
38933895
created_group2.external_group_id.is_some(),
@@ -3903,14 +3905,15 @@ async fn test_multicast_group_id_recycling() -> TestResult {
39033905
group_ip: group_ip3,
39043906
tag: Some("recycling_test_3".to_string()),
39053907
nat_target: nat_target.clone(),
3906-
vlan_id: 10,
3908+
vlan_id: Some(10),
39073909
sources: None,
3908-
ports: vec![],
39093910
};
39103911

39113912
let created_group3 = switch
3913+
.client
39123914
.multicast_group_create_external(&external_create3)
3913-
.await?;
3915+
.await?
3916+
.into_inner();
39143917

39153918
assert!(
39163919
created_group3.external_group_id.is_some(),
@@ -3956,14 +3959,15 @@ async fn test_multicast_group_id_reuse() -> TestResult {
39563959
group_ip,
39573960
tag: Some(format!("id_reuse_test_{}", i)),
39583961
nat_target,
3959-
vlan_id: 10,
3962+
vlan_id: Some(10),
39603963
sources: None,
3961-
ports: vec![],
3962-
};
3964+
};
39633965

39643966
let created_group = switch
3967+
.client
39653968
.multicast_group_create_external(&external_create)
3966-
.await?;
3969+
.await?
3970+
.into_inner();
39673971

39683972
if let Some(external_id) = created_group.external_group_id {
39693973
deleted_external_ids.push(external_id);
@@ -3972,7 +3976,7 @@ async fn test_multicast_group_id_reuse() -> TestResult {
39723976
deleted_underlay_ids.push(underlay_id);
39733977
}
39743978

3975-
switch.multicast_group_delete(&group_ip).await?;
3979+
switch.client.multicast_group_delete(&group_ip).await?;
39763980
}
39773981

39783982
let new_group_ip = IpAddr::V4(Ipv4Addr::new(224, 0, 0, 200));
@@ -3981,14 +3985,15 @@ async fn test_multicast_group_id_reuse() -> TestResult {
39813985
group_ip: new_group_ip,
39823986
tag: Some("id_reuse_verification".to_string()),
39833987
nat_target,
3984-
vlan_id: 10,
3988+
vlan_id: Some(10),
39853989
sources: None,
3986-
ports: vec![],
39873990
};
39883991

39893992
let new_created_group = switch
3993+
.client
39903994
.multicast_group_create_external(&new_external_create)
3991-
.await?;
3995+
.await?
3996+
.into_inner();
39923997

39933998
if let Some(new_external_id) = new_created_group.external_group_id {
39943999
assert!(
@@ -4046,14 +4051,15 @@ async fn test_multicast_group_id_pool_exhaustion_recovery() -> TestResult {
40464051
group_ip,
40474052
tag: Some(format!("pool_test_{}", i)),
40484053
nat_target,
4049-
vlan_id: 10,
4054+
vlan_id: Some(10),
40504055
sources: None,
4051-
ports: vec![],
4052-
};
4056+
};
40534057

40544058
let created_group = switch
4059+
.client
40554060
.multicast_group_create_external(&external_create)
4056-
.await?;
4061+
.await?
4062+
.into_inner();
40574063

40584064
created_groups.push((group_ip, created_group));
40594065
}
@@ -4067,7 +4073,7 @@ async fn test_multicast_group_id_pool_exhaustion_recovery() -> TestResult {
40674073

40684074
let groups_to_delete = &created_groups[0..num_groups / 2];
40694075
for (group_ip, _) in groups_to_delete {
4070-
switch.multicast_group_delete(group_ip).await?;
4076+
switch.client.multicast_group_delete(group_ip).await?;
40714077
}
40724078

40734079
let mut new_groups = Vec::new();
@@ -4078,14 +4084,15 @@ async fn test_multicast_group_id_pool_exhaustion_recovery() -> TestResult {
40784084
group_ip,
40794085
tag: Some(format!("pool_recovery_test_{}", i)),
40804086
nat_target,
4081-
vlan_id: 10,
4087+
vlan_id: Some(10),
40824088
sources: None,
4083-
ports: vec![],
4084-
};
4089+
};
40854090

40864091
let created_group = switch
4092+
.client
40874093
.multicast_group_create_external(&external_create)
4088-
.await?;
4094+
.await?
4095+
.into_inner();
40894096

40904097
new_groups.push((group_ip, created_group));
40914098
}

dpd/src/mcast/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,6 @@ fn delete_multicast_groups(
12801280
})?;
12811281
}
12821282

1283-
12841283
Ok(())
12851284
}
12861285

0 commit comments

Comments
 (0)