Skip to content

Commit

Permalink
feat: add tests to verify if PDB will be deployed when Keda is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
StuxxNet committed Feb 27, 2024
1 parent 6668e36 commit 4b5d622
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions charts/ingress-nginx/tests/controller-keda_pdb_test.yaml
@@ -0,0 +1,21 @@
suite: Controller > Keda > PDB
templates:
- controller-poddisruptionbudget.yaml

tests:
- it: should create a PodDisruptionBudget if `controller.kind` is "Deployment" and `controller.keda.enabled` is true
set:
controller.kind: Deployment
controller.keda.enabled: true
controller.minAvailable: 1
asserts:
- hasDocuments:
count: 1
- isKind:
of: PodDisruptionBudget
- equal:
path: metadata.name
value: RELEASE-NAME-ingress-nginx-controller
- equal:
path: spec.minAvailable
value: 1

0 comments on commit 4b5d622

Please sign in to comment.