From 9583960b0848e23ff3e8c8cd3c63a81fb527f90b Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 26 Sep 2024 09:45:18 +0800 Subject: [PATCH] minor fix --- e2e/keywords/k8s.resource | 4 ++-- e2e/libs/utility/utility.py | 2 +- e2e/tests/negative/node_drain.robot | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/e2e/keywords/k8s.resource b/e2e/keywords/k8s.resource index d85caf8c1f..24fd068b21 100644 --- a/e2e/keywords/k8s.resource +++ b/e2e/keywords/k8s.resource @@ -90,14 +90,14 @@ Check node ${node_id} cordoned Force drain node ${node_id} and expect failure ${drained_node} = get_node_by_index ${node_id} ${instance_manager_name} = get_instance_manager_on_node ${drained_node} - Run Keyword And Expect Error * force drain node ${drained_node} + Run Keyword And Expect Error * force_drain_node ${drained_node} Set Test Variable ${instance_manager_name} Set Test Variable ${drained_node} Force drain node ${node_id} and expect success ${drained_node} = get_node_by_index ${node_id} ${instance_manager_name} = get_instance_manager_on_node ${drained_node} - force drain node ${drained_node} + force_drain_node ${drained_node} Set Test Variable ${instance_manager_name} Set Test Variable ${drained_node} diff --git a/e2e/libs/utility/utility.py b/e2e/libs/utility/utility.py index 062deb92e9..70c6ab3a4f 100644 --- a/e2e/libs/utility/utility.py +++ b/e2e/libs/utility/utility.py @@ -87,7 +87,7 @@ def subprocess_exec_cmd(cmd): return res def subprocess_exec_cmd_with_timeout(cmd, timeout): - res = subprocess.check_output(cmd, timeout) + res = subprocess.check_output(cmd, timeout=timeout) logging(f"Executed command {cmd} with timeout {timeout}s, result {res}") return res diff --git a/e2e/tests/negative/node_drain.robot b/e2e/tests/negative/node_drain.robot index 649a8eae65..6bd4026533 100644 --- a/e2e/tests/negative/node_drain.robot +++ b/e2e/tests/negative/node_drain.robot @@ -191,7 +191,7 @@ Stopped replicas on deleted nodes should not be counted as healthy replicas when And Power off node 1 When Force drain node 2 and expect failure - And Check instance-manager pod is running on node 2 + And Check instance-manager pod is running on node 2 And Check volume 0 replica on node 2 exist Setting Allow Node Drain with the Last Healthy Replica protects the last healthy replica with Pod Disruption Budget (PDB) @@ -223,7 +223,7 @@ Setting Allow Node Drain with the Last Healthy Replica protects the last healthy And Wait for volume 0 detached And Power off node 1 - When Force drain node 2 and expect failure + When Force drain node 2 and expect failure And Check instance-manager pod is running on node 2 When Set setting node-drain-policy to always-allow