Skip to content

Commit 83327ea

Browse files
authored
chore: use simpler assert in delete_subnet_test (#10722)
As [suggested](https://github.com/dfinity/ic/pull/10713/changes#r3557795611) by @daniel-wong-dfinity-org this simplifies the `final_subnet` asserts which should also result in better error messages in case the assert fails.
1 parent cccc33d commit 83327ea

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

rs/tests/nns/delete_subnet_test.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,7 @@ pub fn test(env: TestEnv) {
168168
// The deleted subnets should no longer be in the subnet list; only the
169169
// System (NNS) subnet should remain.
170170
let final_subnets = get_subnet_list_from_registry(&registry_client).await;
171-
assert!(!final_subnets.contains(&engine_subnet.subnet_id));
172-
assert!(!final_subnets.contains(&app_subnet.subnet_id));
173-
assert!(!final_subnets.contains(&vapp_subnet.subnet_id));
174-
assert!(final_subnets.contains(&nns_subnet.subnet_id));
175-
assert_eq!(final_subnets.len(), 1);
171+
assert_eq!(final_subnets, vec![nns_subnet.subnet_id]);
176172

177173
// The subnet records and routing table entries of the deleted subnets should be gone.
178174
for deleted_subnet_id in [

0 commit comments

Comments
 (0)