Skip to content

Commit

Permalink
test(robot): fix getting wrong replica node
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Chiu <[email protected]>
  • Loading branch information
yangchiu committed May 2, 2024
1 parent da29ef3 commit c9c22ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions e2e/keywords/workload.resource
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Library ../libs/keywords/common_keywords.py
Library ../libs/keywords/volume_keywords.py
Library ../libs/keywords/workload_keywords.py
Library ../libs/keywords/host_keywords.py
Library ../libs/keywords/kubelet_keywords.py
Library ../libs/keywords/k8s_keywords.py

*** Keywords ***
Keep writing data to pod of ${workload_kind} ${workload_id}
Expand Down Expand Up @@ -36,7 +36,7 @@ Wait for volume of ${workload_kind} ${workload_id} healthy
Wait until volume of ${workload_kind} ${workload_id} replica rebuidling started on ${replica_locality}
${workload_name} = generate_name_with_suffix ${workload_kind} ${workload_id}
${volume_name} = get_workload_volume_name ${workload_name}
wait_for_replica_rebuilding_to_complete_on_node ${volume_name} ${replica_locality}
wait_for_replica_rebuilding_to_start_on_node ${volume_name} ${replica_locality}

Wait for volume of ${workload_kind} ${workload_id} attached and unknown
${workload_name} = generate_name_with_suffix ${workload_kind} ${workload_id}
Expand Down
2 changes: 1 addition & 1 deletion e2e/libs/keywords/volume_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def get_node_ids_by_replica_locality(self, volume_name, replica_locality):
return [volume['spec']['nodeID']]

worker_nodes = self.node.list_node_names_by_role("worker")
volume_node = self.get_node_ids_by_replica_locality(volume_name, "volume node")
volume_node = self.get_node_id_by_replica_locality(volume_name, "volume node")
replica_nodes = [node for node in worker_nodes if node != volume_node]
test_pod_node = self.node.get_test_pod_running_node()

Expand Down

0 comments on commit c9c22ac

Please sign in to comment.