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,9 @@ 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 (
187
+ kind = "Job" , conditions = [make_condition (COMPLETE_CONDITION_KEY , True )]
188
+ )
186
189
187
190
188
191
def test_verify_job_failed ():
@@ -216,7 +219,7 @@ def test_verify_job_separate_namespace():
216
219
"""Make sure a completed job from a different namespace verifies cleanly"""
217
220
assert run_test_verify (
218
221
kind = "Job" ,
219
- conditions = [make_condition ("Completed" , True )],
222
+ conditions = [make_condition (COMPLETE_CONDITION_KEY , True )],
220
223
obj_namespace = "adifferent" ,
221
224
search_namespace = "adifferent" ,
222
225
)
@@ -226,7 +229,7 @@ def test_verify_job_null_namespace():
226
229
"""Make sure a completed job in the same namespace verifies cleanly"""
227
230
assert run_test_verify (
228
231
kind = "Job" ,
229
- conditions = [make_condition ("Completed" , True )],
232
+ conditions = [make_condition (COMPLETE_CONDITION_KEY , True )],
230
233
obj_namespace = TEST_NAMESPACE ,
231
234
search_namespace = _SESSION_NAMESPACE ,
232
235
)
0 commit comments