|
@@ -118,10 +118,16 @@ fn off_extras_whole_cluster_keeps_extras_subset_skips_them() {
|
|
|
// A whole-cluster power off (no --node) turns the shared fabric off too.
|
|
// A whole-cluster power off (no --node) turns the shared fabric off too.
|
|
|
let cfg = cfg_with_ha();
|
|
let cfg = cfg_with_ha();
|
|
|
let c = crate::config::select_cluster_by_name(&cfg, "x").unwrap();
|
|
let c = crate::config::select_cluster_by_name(&cfg, "x").unwrap();
|
|
|
- assert_eq!(off_extras(&c, &[], &empty), vec!["switch.network_x".to_string()]);
|
|
|
|
|
|
|
+ assert_eq!(
|
|
|
|
|
+ off_extras(&c, &[], &empty),
|
|
|
|
|
+ vec!["switch.network_x".to_string()]
|
|
|
|
|
+ );
|
|
|
// A subset power off (--node) must NOT take the shared switch down —
|
|
// A subset power off (--node) must NOT take the shared switch down —
|
|
|
// the nodes that stay up depend on it (NCCL over the fabric).
|
|
// the nodes that stay up depend on it (NCCL over the fabric).
|
|
|
- assert_eq!(off_extras(&c, &["n1".to_string()], &empty), Vec::<String>::new());
|
|
|
|
|
|
|
+ assert_eq!(
|
|
|
|
|
+ off_extras(&c, &["n1".to_string()], &empty),
|
|
|
|
|
+ Vec::<String>::new()
|
|
|
|
|
+ );
|
|
|
assert_eq!(
|
|
assert_eq!(
|
|
|
off_extras(&c, &["n1".to_string(), "n2".to_string()], &empty),
|
|
off_extras(&c, &["n1".to_string(), "n2".to_string()], &empty),
|
|
|
Vec::<String>::new()
|
|
Vec::<String>::new()
|
|
@@ -141,7 +147,10 @@ fn off_extras_whole_cluster_keeps_extra_held_by_other_active_cluster() {
|
|
|
assert_eq!(off_extras(&c, &[], &held), Vec::<String>::new());
|
|
assert_eq!(off_extras(&c, &[], &held), Vec::<String>::new());
|
|
|
// an unrelated held entity does not protect this cluster's switch
|
|
// an unrelated held entity does not protect this cluster's switch
|
|
|
let other: HashSet<String> = ["switch.somewhere_else".to_string()].into_iter().collect();
|
|
let other: HashSet<String> = ["switch.somewhere_else".to_string()].into_iter().collect();
|
|
|
- assert_eq!(off_extras(&c, &[], &other), vec!["switch.network_x".to_string()]);
|
|
|
|
|
|
|
+ assert_eq!(
|
|
|
|
|
+ off_extras(&c, &[], &other),
|
|
|
|
|
+ vec!["switch.network_x".to_string()]
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
#[test]
|