20
20
from oper8 .utils import nested_set
21
21
from oper8 .verify_resources import (
22
22
AVAILABLE_CONDITION_KEY ,
23
+ COMPLETE_CONDITION_KEY ,
23
24
DEFAULT_TIMESTAMP_KEY ,
24
25
NEW_RS_AVAILABLE_REASON ,
25
26
PROGRESSING_CONDITION_KEY ,
@@ -182,7 +183,7 @@ def test_verify_pod_custom_verification():
182
183
183
184
def test_verify_job_completed ():
184
185
"""Make sure a completed job verifies cleanly"""
185
- assert run_test_verify (kind = "Job" , conditions = [make_condition ("Completed" , True )])
186
+ assert run_test_verify (kind = "Job" , conditions = [make_condition (COMPLETE_CONDITION_KEY , True )])
186
187
187
188
188
189
def test_verify_job_failed ():
@@ -216,7 +217,7 @@ def test_verify_job_separate_namespace():
216
217
"""Make sure a completed job from a different namespace verifies cleanly"""
217
218
assert run_test_verify (
218
219
kind = "Job" ,
219
- conditions = [make_condition ("Completed" , True )],
220
+ conditions = [make_condition (COMPLETE_CONDITION_KEY , True )],
220
221
obj_namespace = "adifferent" ,
221
222
search_namespace = "adifferent" ,
222
223
)
@@ -226,7 +227,7 @@ def test_verify_job_null_namespace():
226
227
"""Make sure a completed job in the same namespace verifies cleanly"""
227
228
assert run_test_verify (
228
229
kind = "Job" ,
229
- conditions = [make_condition ("Completed" , True )],
230
+ conditions = [make_condition (COMPLETE_CONDITION_KEY , True )],
230
231
obj_namespace = TEST_NAMESPACE ,
231
232
search_namespace = _SESSION_NAMESPACE ,
232
233
)
0 commit comments