|
@@ -28,6 +28,7 @@ tests:
|
|
|
concurrencyPolicy: Forbid
|
|
|
failedJobsHistoryLimit: 1
|
|
|
successfulJobsHistoryLimit: 3
|
|
|
+ suspend: false
|
|
|
startingDeadlineSeconds:
|
|
|
- documentIndex: *cronJobDoc
|
|
|
isSubset:
|
|
@@ -83,3 +84,71 @@ tests:
|
|
|
parallelism: 5
|
|
|
ttlSecondsAfterFinished: 100
|
|
|
activeDeadlineSeconds: 100
|
|
|
+
|
|
|
+ - it: should set suspend to true
|
|
|
+ set:
|
|
|
+ workload:
|
|
|
+ workload-name:
|
|
|
+ enabled: true
|
|
|
+ primary: true
|
|
|
+ type: CronJob
|
|
|
+ schedule: "*/5 * * * *"
|
|
|
+ suspend: true
|
|
|
+ podSpec:
|
|
|
+ restartPolicy: Never
|
|
|
+ asserts:
|
|
|
+ - documentIndex: *cronJobDoc
|
|
|
+ isSubset:
|
|
|
+ path: spec
|
|
|
+ content:
|
|
|
+ schedule: "*/5 * * * *"
|
|
|
+ timeZone: UTC
|
|
|
+ suspend: true
|
|
|
+
|
|
|
+ - it: should set suspend to true on ixChartContext - isStopped (true)
|
|
|
+ set:
|
|
|
+ global:
|
|
|
+ ixChartContext:
|
|
|
+ storageClassName: some-storage-class
|
|
|
+ isStopped: true
|
|
|
+ workload:
|
|
|
+ workload-name:
|
|
|
+ enabled: true
|
|
|
+ primary: true
|
|
|
+ type: CronJob
|
|
|
+ schedule: "*/5 * * * *"
|
|
|
+ suspend: false
|
|
|
+ podSpec:
|
|
|
+ restartPolicy: Never
|
|
|
+ asserts:
|
|
|
+ - documentIndex: *cronJobDoc
|
|
|
+ isSubset:
|
|
|
+ path: spec
|
|
|
+ content:
|
|
|
+ schedule: "*/5 * * * *"
|
|
|
+ timeZone: UTC
|
|
|
+ suspend: true
|
|
|
+
|
|
|
+ - it: should not set suspend to true on ixChartContext - isStopped (false)
|
|
|
+ set:
|
|
|
+ global:
|
|
|
+ ixChartContext:
|
|
|
+ storageClassName: some-storage-class
|
|
|
+ isStopped: false
|
|
|
+ workload:
|
|
|
+ workload-name:
|
|
|
+ enabled: true
|
|
|
+ primary: true
|
|
|
+ type: CronJob
|
|
|
+ schedule: "*/5 * * * *"
|
|
|
+ suspend: false
|
|
|
+ podSpec:
|
|
|
+ restartPolicy: Never
|
|
|
+ asserts:
|
|
|
+ - documentIndex: *cronJobDoc
|
|
|
+ isSubset:
|
|
|
+ path: spec
|
|
|
+ content:
|
|
|
+ schedule: "*/5 * * * *"
|
|
|
+ timeZone: UTC
|
|
|
+ suspend: false
|