Skip to content

Commit

Permalink
Add timeout support for Helm charts.
Browse files Browse the repository at this point in the history
Tests in helm charts can specify how much time we should wait.
It is suitable for long time running builds

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
  • Loading branch information
phracek committed Oct 14, 2024
1 parent 2af226d commit c58d9df
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions container_ci_suite/helm.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ def is_chart_yaml_present(self):
return True
return False

def is_s2i_pod_running(self, pod_name_prefix: str):
def is_s2i_pod_running(self, pod_name_prefix: str, timeout: int = 180):
oc_ops = OpenShiftOperations()
oc_ops.set_namespace(namespace=self.oc_api.namespace)
return oc_ops.is_s2i_pod_running(pod_name_prefix=pod_name_prefix)
return oc_ops.is_s2i_pod_running(pod_name_prefix=pod_name_prefix, cycle_count=timeout)

def is_pod_running(self, pod_name_prefix: str):
def is_pod_running(self, pod_name_prefix: str, loops: int = 180):
oc_ops = OpenShiftOperations()
oc_ops.set_namespace(namespace=self.oc_api.namespace)
return oc_ops.is_pod_running(pod_name_prefix=pod_name_prefix)
return oc_ops.is_pod_running(pod_name_prefix=pod_name_prefix, loops=loops)

def helm_package(self) -> bool:
"""
Expand Down

0 comments on commit c58d9df

Please sign in to comment.