Skip to content

Commit

Permalink
fix typo in Job condition check
Browse files Browse the repository at this point in the history
Signed-off-by: Zac Pitones <[email protected]>
  • Loading branch information
pit1sIBM committed May 24, 2024
1 parent d651383 commit 5d226f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion oper8/verify_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def verify_pod(object_state: dict) -> bool:
def verify_job(object_state: dict) -> bool:
"""Verify that a job has completed successfully"""
# https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/job-v1/#JobStatus
return _verify_condition(object_state, "Completed", True)
return _verify_condition(object_state, "Complete", True)


def verify_deployment(object_state: dict) -> bool:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_verify_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def test_verify_pod_custom_verification():

def test_verify_job_completed():
"""Make sure a completed job verifies cleanly"""
assert run_test_verify(kind="Job", conditions=[make_condition("Completed", True)])
assert run_test_verify(kind="Job", conditions=[make_condition("Complete", True)])


def test_verify_job_failed():
Expand Down Expand Up @@ -216,7 +216,7 @@ def test_verify_job_separate_namespace():
"""Make sure a completed job from a different namespace verifies cleanly"""
assert run_test_verify(
kind="Job",
conditions=[make_condition("Completed", True)],
conditions=[make_condition("Complete", True)],
obj_namespace="adifferent",
search_namespace="adifferent",
)
Expand All @@ -226,7 +226,7 @@ def test_verify_job_null_namespace():
"""Make sure a completed job in the same namespace verifies cleanly"""
assert run_test_verify(
kind="Job",
conditions=[make_condition("Completed", True)],
conditions=[make_condition("Complete", True)],
obj_namespace=TEST_NAMESPACE,
search_namespace=_SESSION_NAMESPACE,
)
Expand Down

0 comments on commit 5d226f4

Please sign in to comment.