Skip to content

Commit

Permalink
test: disable node subnet replacement tests
Browse files Browse the repository at this point in the history
### Summary

- Disabled tests related to node replacement in subnet.

### Details

- Marked `should_add_node_and_replace_existing_node_in_subnet` as ignored in `do_add_node.rs` pending Consensus team support.
- Marked `should_replace_node_in_subnet_and_update_allowance` as ignored in `do_remove_node_directly.rs` pending Consensus team support.

### Additional Changes

- Introduced `replacements_of_nodes_in_subnets_enabled` flag set to `false` in `do_remove_node_directly.rs` to conditionally control node replacement logic.
  • Loading branch information
sasa-tomic authored and aterga committed Feb 13, 2025
1 parent 7e5f934 commit 8c1e08c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,8 @@ mod tests {
assert!(e.contains("do_add_node: There is already another node with the same IPv4 address"));
}

// This test is disabled until the Consensus team is ready to support direct replacement of nodes that are active in a subnet.
#[ignore]
#[test]
fn should_add_node_and_replace_existing_node_in_subnet() {
// This test verifies that adding a new node replaces an existing node in a subnet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ impl Registry {
// 4. Check if node is in a subnet, and if so, replace it in the subnet by updating the membership in the subnet record.
let subnet_list_record = get_subnet_list_record(self);
let is_node_in_subnet = find_subnet_for_node(self, payload.node_id, &subnet_list_record);
// Disabled until the Consensus team is ready to support direct replacement of nodes that are active in a subnet.
let replacements_of_nodes_in_subnets_enabled = false;
if let Some(subnet_id) = is_node_in_subnet {
if new_node_id.is_some() {
if new_node_id.is_some() && replacements_of_nodes_in_subnets_enabled {
// The node is in a subnet and is being replaced with a new node.
// Update the subnet record with the new node membership.
let mut subnet_record = self.get_subnet_or_panic(subnet_id);
Expand Down Expand Up @@ -626,6 +628,8 @@ mod tests {
registry.do_remove_node(payload, node_operator_id);
}

// This test is disabled until the Consensus team is ready to support direct replacement of nodes that are active in a subnet.
#[ignore]
#[test]
fn should_replace_node_in_subnet_and_update_allowance() {
let mut registry = invariant_compliant_registry(0);
Expand Down

0 comments on commit 8c1e08c

Please sign in to comment.