Skip to content

Commit

Permalink
changed image in test_exist_path_in_pod from fedtools to alpine
Browse files Browse the repository at this point in the history
linting
  • Loading branch information
tsebastiani committed Dec 4, 2024
1 parent d01577a commit bdc2e17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/krkn_lib/k8s/krkn_kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2447,8 +2447,7 @@ def is_pod_running(self, pod_name: str, namespace: str) -> bool:
if not status.ready:
is_ready = False
return is_ready
except Exception as e:
print(f"IS_POD_RUNNING_EXCEPTION: {e}")
except Exception:
return False

def is_pod_terminating(self, pod_name: str, namespace: str) -> bool:
Expand Down
7 changes: 4 additions & 3 deletions src/krkn_lib/tests/test_krkn_kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,13 +851,14 @@ def test_download_folder_from_pod_as_archive(self):

def test_exists_path_in_pod(self):
namespace = "test-" + self.get_random_string(10)
pod_name = "alpine-"+self.get_random_string(10)
self.deploy_namespace(namespace, [])
# to ensure that the namespace is fully deployed
time.sleep(5)
self.deploy_fedtools(namespace=namespace)
self.depoy_alpine(pod_name, namespace)
count = 0
MAX_RETRIES = 200
while not self.lib_k8s.is_pod_running("fedtools", namespace):
MAX_RETRIES = 20
while not self.lib_k8s.is_pod_running(pod_name, namespace):
if count > MAX_RETRIES:
self.assertFalse(True, "container failed to become ready")
count += 1
Expand Down

0 comments on commit bdc2e17

Please sign in to comment.