Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5d226f4

Browse files
committedMay 24, 2024··
fix typo in Job condition check
Signed-off-by: Zac Pitones <[email protected]>
1 parent d651383 commit 5d226f4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎oper8/verify_resources.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def verify_pod(object_state: dict) -> bool:
144144
def verify_job(object_state: dict) -> bool:
145145
"""Verify that a job has completed successfully"""
146146
# https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/job-v1/#JobStatus
147-
return _verify_condition(object_state, "Completed", True)
147+
return _verify_condition(object_state, "Complete", True)
148148

149149

150150
def verify_deployment(object_state: dict) -> bool:

‎tests/test_verify_resources.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def test_verify_pod_custom_verification():
182182

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

187187

188188
def test_verify_job_failed():
@@ -216,7 +216,7 @@ def test_verify_job_separate_namespace():
216216
"""Make sure a completed job from a different namespace verifies cleanly"""
217217
assert run_test_verify(
218218
kind="Job",
219-
conditions=[make_condition("Completed", True)],
219+
conditions=[make_condition("Complete", True)],
220220
obj_namespace="adifferent",
221221
search_namespace="adifferent",
222222
)
@@ -226,7 +226,7 @@ def test_verify_job_null_namespace():
226226
"""Make sure a completed job in the same namespace verifies cleanly"""
227227
assert run_test_verify(
228228
kind="Job",
229-
conditions=[make_condition("Completed", True)],
229+
conditions=[make_condition("Complete", True)],
230230
obj_namespace=TEST_NAMESPACE,
231231
search_namespace=_SESSION_NAMESPACE,
232232
)

0 commit comments

Comments
 (0)
Please sign in to comment.