mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release v2.5.0 (#258)
Co-authored-by: Maurits <75321636+maurits-funda@users.noreply.github.com> Co-authored-by: Noam Lerner <bugok@users.noreply.github.com>
This commit is contained in:
parent
1582fe27c4
commit
a548690b00
25 changed files with 670 additions and 56 deletions
57
charts/library/common-test/tests/controller/job_test.yaml
Normal file
57
charts/library/common-test/tests/controller/job_test.yaml
Normal file
|
@ -0,0 +1,57 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
||||
suite: job configuration
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default job configuration should pass
|
||||
set:
|
||||
controllers:
|
||||
main:
|
||||
type: job
|
||||
asserts:
|
||||
- documentIndex: &ControllerDoc 0
|
||||
isKind:
|
||||
of: Job
|
||||
- documentIndex: *ControllerDoc
|
||||
notExists:
|
||||
path: spec.suspend
|
||||
- documentIndex: *ControllerDoc
|
||||
notExists:
|
||||
path: spec.ttlSecondsAfterFinished
|
||||
- documentIndex: *ControllerDoc
|
||||
equal:
|
||||
path: spec.template.spec.restartPolicy
|
||||
value: Never
|
||||
|
||||
- it: custom job configuration should pass
|
||||
set:
|
||||
controllers:
|
||||
main:
|
||||
type: job
|
||||
pod:
|
||||
restartPolicy: OnFailure
|
||||
job:
|
||||
suspend: &JobSuspended true
|
||||
ttlSecondsAfterFinished: &ttlSecondsAfterFinished 3600
|
||||
backoffLimit: 3
|
||||
asserts:
|
||||
- documentIndex: &ControllerDoc 0
|
||||
isKind:
|
||||
of: Job
|
||||
- documentIndex: *ControllerDoc
|
||||
equal:
|
||||
path: spec.suspend
|
||||
value: *JobSuspended
|
||||
- documentIndex: *ControllerDoc
|
||||
equal:
|
||||
path: spec.ttlSecondsAfterFinished
|
||||
value: *ttlSecondsAfterFinished
|
||||
- documentIndex: *ControllerDoc
|
||||
equal:
|
||||
path: spec.template.spec.restartPolicy
|
||||
value: OnFailure
|
||||
- documentIndex: *ControllerDoc
|
||||
equal:
|
||||
path: spec.backoffLimit
|
||||
value: 3
|
Loading…
Add table
Add a link
Reference in a new issue