Update charts/ingress-nginx/tests/controller-poddisruptionbudget_test.yaml
Co-authored-by: Marco Ebert <marco_ebert@icloud.com>
This commit is contained in:
parent
6480e14eb6
commit
17ee81cfc9
1 changed files with 50 additions and 7 deletions
|
@ -3,12 +3,9 @@ templates:
|
||||||
- controller-poddisruptionbudget.yaml
|
- controller-poddisruptionbudget.yaml
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
- it: should create a PodDisruptionBudget if `controller.kind` is "Deployment" and `controller.keda.enabled` is true
|
- it: should create a PodDisruptionBudget if `controller.replicaCount` is greater than 1
|
||||||
set:
|
set:
|
||||||
controller.kind: Deployment
|
controller.replicaCount: 2
|
||||||
controller.keda.enabled: true
|
|
||||||
controller.keda.minReplicas: 2
|
|
||||||
controller.minAvailable: 1
|
|
||||||
asserts:
|
asserts:
|
||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 1
|
count: 1
|
||||||
|
@ -17,6 +14,52 @@ tests:
|
||||||
- equal:
|
- equal:
|
||||||
path: metadata.name
|
path: metadata.name
|
||||||
value: RELEASE-NAME-ingress-nginx-controller
|
value: RELEASE-NAME-ingress-nginx-controller
|
||||||
|
|
||||||
|
- it: should not create a PodDisruptionBudget if `controller.replicaCount` is less than or equal 1
|
||||||
|
set:
|
||||||
|
controller.replicaCount: 1
|
||||||
|
asserts:
|
||||||
|
- hasDocuments:
|
||||||
|
count: 0
|
||||||
|
|
||||||
|
- it: should create a PodDisruptionBudget if `controller.autoscaling.enabled` is true and `controller.autoscaling.minReplicas` is greater than 1
|
||||||
|
set:
|
||||||
|
controller.autoscaling.enabled: true
|
||||||
|
controller.autoscaling.minReplicas: 2
|
||||||
|
asserts:
|
||||||
|
- hasDocuments:
|
||||||
|
count: 1
|
||||||
|
- isKind:
|
||||||
|
of: PodDisruptionBudget
|
||||||
- equal:
|
- equal:
|
||||||
path: spec.minAvailable
|
path: metadata.name
|
||||||
value: 1
|
value: RELEASE-NAME-ingress-nginx-controller
|
||||||
|
|
||||||
|
- it: should not create a PodDisruptionBudget if `controller.autoscaling.enabled` is true and `controller.autoscaling.minReplicas` is less than or equal 1
|
||||||
|
set:
|
||||||
|
controller.autoscaling.enabled: true
|
||||||
|
controller.autoscaling.minReplicas: 1
|
||||||
|
asserts:
|
||||||
|
- hasDocuments:
|
||||||
|
count: 0
|
||||||
|
|
||||||
|
- it: should create a PodDisruptionBudget if `controller.keda.enabled` is true and `controller.keda.minReplicas` is greater than 1
|
||||||
|
set:
|
||||||
|
controller.keda.enabled: true
|
||||||
|
controller.keda.minReplicas: 2
|
||||||
|
asserts:
|
||||||
|
- hasDocuments:
|
||||||
|
count: 1
|
||||||
|
- isKind:
|
||||||
|
of: PodDisruptionBudget
|
||||||
|
- equal:
|
||||||
|
path: metadata.name
|
||||||
|
value: RELEASE-NAME-ingress-nginx-controller
|
||||||
|
|
||||||
|
- it: should not create a PodDisruptionBudget if `controller.keda.enabled` is true and `controller.keda.minReplicas` is less than or equal 1
|
||||||
|
set:
|
||||||
|
controller.keda.enabled: true
|
||||||
|
controller.keda.minReplicas: 1
|
||||||
|
asserts:
|
||||||
|
- hasDocuments:
|
||||||
|
count: 0
|
||||||
|
|
Loading…
Reference in a new issue