File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,6 @@ def test_get_job_remove(self):
142142 runAsGroup: 1000
143143 runAsUser: 1000
144144 serviceAccountName: test1-tfstate
145- ttlSecondsAfterFinished: 36000
146145 volumes:
147146 - emptyDir: {}
148147 name: runner-data
@@ -163,7 +162,9 @@ def test_get_job_remove(self):
163162 defaultMode: 256
164163 optional: true
165164 secretName: ssh-type1
165+ ttlSecondsAfterFinished: 36000
166166""" # noqa
167+
167168 self .assertEqual (expected , yaml .safe_dump (job ))
168169
169170 @mock .patch .dict (
@@ -315,7 +316,6 @@ def test_get_job_remove_with_trust_bundle(self):
315316 runAsGroup: 1000
316317 runAsUser: 1000
317318 serviceAccountName: test1-tfstate
318- ttlSecondsAfterFinished: 36000
319319 volumes:
320320 - emptyDir: {}
321321 name: runner-data
@@ -339,6 +339,7 @@ def test_get_job_remove_with_trust_bundle(self):
339339 - configMap:
340340 name: trust-bundle
341341 name: trust-bundle
342+ ttlSecondsAfterFinished: 36000
342343""" # noqa
343344 self .assertEqual (expected , yaml .safe_dump (job ))
344345
Original file line number Diff line number Diff line change @@ -269,16 +269,16 @@ def get_job(
269269 azimuth-caas-cluster: "{ cluster .metadata .name } "
270270 azimuth-caas-action: "{ action } "
271271spec:
272- template:
273- spec:
274- {
272+ {
275273 '''
276- # auto-remove delete jobs after 10 hours
277- ttlSecondsAfterFinished: 36000
278- '''
274+ # auto-remove delete jobs after 10 hours
275+ ttlSecondsAfterFinished: 36000
276+ '''
279277 if remove
280278 else ""
281279 }
280+ template:
281+ spec:
282282 serviceAccountName: { service_account_name }
283283 securityContext:
284284 runAsUser: 1000
You can’t perform that action at this time.
0 commit comments