Skip to content

Commit

Permalink
Revert "Revert "Tests: describe pod if error on condition wait comman…
Browse files Browse the repository at this point in the history
…d"" (#772)

Reverts #771
  • Loading branch information
rd-pong authored Jul 17, 2023
1 parent fd09395 commit 0fee1ee
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/e2e/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,13 @@ def kubectl_wait_pods(
else:
cmd = f"kubectl wait --for=condition={condition} pod -l '{identifier} in ({pods})' --timeout={timeout}s"
print(f"running command: {cmd}")
assert os.system(cmd) == 0
retcode = os.system(cmd)

if retcode is not 0:
ns = f"-n {namespace}" if namespace else ""
debug_cmd = f"kubectl describe pod -l '{identifier} in ({pods})' --timeout={timeout}s {ns}"
os.system(debug_cmd)
raise Exception("Timeout/error waiting for pod condition")


def kubectl_wait_crd(crd, timeout=60, condition="established"):
Expand Down

0 comments on commit 0fee1ee

Please sign in to comment.