ingress-nginx-helm/charts/ingress-nginx/tests/controller-hpa_test.yaml

32 lines
824 B
YAML
Raw Permalink Normal View History

suite: Controller > HPA
templates:
- controller-hpa.yaml
tests:
- it: should create an HPA if `controller.autoscaling.enabled` is true
set:
controller.autoscaling.enabled: true
asserts:
- hasDocuments:
count: 1
- isKind:
of: HorizontalPodAutoscaler
- equal:
path: metadata.name
value: RELEASE-NAME-ingress-nginx-controller
- it: should not create an HPA if `controller.autoscaling.enabled` is true and `controller.keda.enabled` is true
set:
controller.autoscaling.enabled: true
controller.keda.enabled: true
asserts:
- hasDocuments:
count: 0
- it: should not create an HPA if `controller.kind` is "DaemonSet"
set:
controller.kind: DaemonSet
asserts:
- hasDocuments:
count: 0