123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- suite: deployment spec test
- templates:
- - common.yaml
- tests:
- - it: should pass with workload enabled
- set:
- workload:
- workload-name:
- enabled: true
- primary: true
- type: Deployment
- podSpec: {}
- asserts:
- - documentIndex: &deploymentDoc 0
- isKind:
- of: Deployment
- - documentIndex: *deploymentDoc
- isAPIVersion:
- of: apps/v1
- - documentIndex: *deploymentDoc
- isSubset:
- path: spec
- content:
- replicas: 1
- revisionHistoryLimit: 3
- strategy:
- type: Recreate
- - it: should apply spec correctly
- set:
- workload:
- workload-name:
- enabled: true
- primary: true
- type: Deployment
- replicas: 2
- revisionHistoryLimit: 4
- strategy: RollingUpdate
- rollingUpdate:
- maxSurge: 5
- maxUnavailable: 5
- podSpec: {}
- asserts:
- - documentIndex: *deploymentDoc
- isSubset:
- path: spec
- content:
- replicas: 2
- revisionHistoryLimit: 4
- strategy:
- type: RollingUpdate
- rollingUpdate:
- maxSurge: 5
- maxUnavailable: 5
- - it: should apply maxSurge with 0
- set:
- workload:
- workload-name:
- enabled: true
- primary: true
- type: Deployment
- strategy: RollingUpdate
- rollingUpdate:
- maxSurge: 0
- podSpec: {}
- asserts:
- - documentIndex: *deploymentDoc
- isSubset:
- path: spec
- content:
- strategy:
- type: RollingUpdate
- rollingUpdate:
- maxSurge: 0
- - it: should apply maxUnavailable with 0
- set:
- workload:
- workload-name:
- enabled: true
- primary: true
- type: Deployment
- strategy: RollingUpdate
- rollingUpdate:
- maxUnavailable: 0
- podSpec: {}
- asserts:
- - documentIndex: *deploymentDoc
- isSubset:
- path: spec
- content:
- strategy:
- type: RollingUpdate
- rollingUpdate:
- maxUnavailable: 0
- - it: should set replicas to 0 on ixChartContext - isStopped (true)
- set:
- global:
- ixChartContext:
- storageClassName: some-storage-class
- isStopped: true
- workload:
- workload-name:
- enabled: true
- primary: true
- type: Deployment
- replicas: 2
- podSpec: {}
- asserts:
- - documentIndex: *deploymentDoc
- isSubset:
- path: spec
- content:
- replicas: 0
- - it: should not set replicas to 0 on ixChartContext - isStopped (false)
- set:
- global:
- ixChartContext:
- storageClassName: some-storage-class
- isStopped: false
- workload:
- workload-name:
- enabled: true
- primary: true
- type: Deployment
- replicas: 2
- podSpec: {}
- asserts:
- - documentIndex: *deploymentDoc
- isSubset:
- path: spec
- content:
- replicas: 2
|