Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscchien committed Sep 26, 2024
1 parent 7f371e9 commit 8763ccd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
4 changes: 2 additions & 2 deletions e2e/keywords/longhorn.resource
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ Check Longhorn workload pods ${condition} annotated with ${key}
... ELSE IF '${condition}' == 'is' Should Be True ${is_annotated}
... ELSE Fail Invalid condition ${condition}

Check instance-manager pod is not running on drained node
Check instance-manager pod is not running on drained node
${pod} = get_instance_manager_on_node ${drained_node}
Should Be Equal ${pod} ${None}

Check instance-manager pod is running on node ${node_id}
Check instance-manager pod is running on node ${node_id}
${node_name} = get_node_by_index ${node_id}
${pod} = get_instance_manager_on_node ${node_name}
Should Not Be Equal ${pod} ${None}
10 changes: 1 addition & 9 deletions e2e/libs/keywords/k8s_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
from k8s.k8s import wait_all_pods_evicted
from k8s.k8s import get_all_pods_on_node
from k8s.k8s import check_node_cordoned
from k8s.k8s import check_drain_process_not_completed
from k8s.k8s import get_instance_manager_on_node
from k8s.k8s import check_instance_manager_pdb_not_exist
from k8s.k8s import check_drain_process_completed
from utility.utility import logging
from node import Node

Expand Down Expand Up @@ -75,14 +73,8 @@ def get_all_pods_on_node(self, node_name):
def check_node_cordoned(self, node_name):
check_node_cordoned(node_name)

def check_drain_process_not_completed(self, drain_process):
return check_drain_process_not_completed(drain_process)

def check_drain_process_completed(self, drain_process):
return check_drain_process_completed(drain_process)

def get_instance_manager_on_node(self, node_name):
return get_instance_manager_on_node(node_name)

def check_instance_manager_pdb_not_exist(self, instance_manager):
return check_instance_manager_pdb_not_exist(instance_manager)
return check_instance_manager_pdb_not_exist(instance_manager)
2 changes: 1 addition & 1 deletion e2e/libs/utility/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def subprocess_exec_cmd(cmd):

def subprocess_exec_cmd_with_timeout(cmd, timeout):
res = subprocess.check_output(cmd, timeout)
logging(f"Executed command {cmd} with result {res}")
logging(f"Executed command {cmd} with timeout {timeout}s, result {res}")
return res

def wait_for_cluster_ready():
Expand Down
2 changes: 1 addition & 1 deletion e2e/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ kubernetes==27.2.0
requests==2.32.3
boto3==1.35.19
pyyaml==6.0.2
minio==5.0.10
minio==5.0.10

0 comments on commit 8763ccd

Please sign in to comment.