Merge pull request #94 from bmbeverst/fix_tests

Fix new helm-unittest tests
This commit is contained in:
WrightNed 2024-02-22 14:24:37 +02:00 committed by GitHub
commit c255621cd6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 17 additions and 12 deletions

View File

@ -21,7 +21,7 @@ tests:
of: ConfigMap
- equal:
path: metadata.name
value: RELEASE-NAME-ingress-nginx-custom-add-headers
value: RELEASE-NAME-open-appsec-k8s-nginx-ingress-custom-add-headers
- equal:
path: data.X-Another-Custom-Header
value: Value

View File

@ -21,7 +21,7 @@ tests:
of: ConfigMap
- equal:
path: metadata.name
value: RELEASE-NAME-ingress-nginx-custom-proxy-headers
value: RELEASE-NAME-open-appsec-k8s-nginx-ingress-custom-proxy-headers
- equal:
path: data.X-Custom-Header
value: Value

View File

@ -11,4 +11,4 @@ tests:
of: ConfigMap
- equal:
path: metadata.name
value: RELEASE-NAME-ingress-nginx-controller
value: RELEASE-NAME-open-appsec-k8s-nginx-ingress-controller

View File

@ -6,6 +6,7 @@ tests:
- it: should create a DaemonSet if `controller.kind` is "DaemonSet"
set:
controller.kind: DaemonSet
kind: Vanilla
asserts:
- hasDocuments:
count: 1
@ -13,4 +14,4 @@ tests:
of: DaemonSet
- equal:
path: metadata.name
value: RELEASE-NAME-ingress-nginx-controller
value: RELEASE-NAME-open-appsec-k8s-nginx-ingress-controller

View File

@ -4,6 +4,8 @@ templates:
tests:
- it: should create a Deployment
set:
kind: Vanilla
asserts:
- hasDocuments:
count: 1
@ -11,11 +13,12 @@ tests:
of: Deployment
- equal:
path: metadata.name
value: RELEASE-NAME-ingress-nginx-controller
value: RELEASE-NAME-open-appsec-k8s-nginx-ingress-controller
- it: should create a Deployment with 3 replicas if `controller.replicaCount` is 3
set:
controller.replicaCount: 3
kind: Vanilla
asserts:
- equal:
path: spec.replicas
@ -25,6 +28,7 @@ tests:
set:
controller.resources.limits.cpu: 500m
controller.resources.limits.memory: 512Mi
kind: Vanilla
asserts:
- equal:
path: spec.template.spec.containers[0].resources.limits.cpu

View File

@ -14,4 +14,4 @@ tests:
of: HorizontalPodAutoscaler
- equal:
path: metadata.name
value: RELEASE-NAME-ingress-nginx-controller
value: RELEASE-NAME-open-appsec-k8s-nginx-ingress-controller

View File

@ -14,4 +14,4 @@ tests:
of: ScaledObject
- equal:
path: metadata.name
value: RELEASE-NAME-ingress-nginx-controller
value: RELEASE-NAME-open-appsec-k8s-nginx-ingress-controller

View File

@ -20,4 +20,4 @@ tests:
of: NetworkPolicy
- equal:
path: metadata.name
value: RELEASE-NAME-ingress-nginx-controller
value: RELEASE-NAME-open-appsec-k8s-nginx-ingress-controller

View File

@ -22,4 +22,4 @@ tests:
of: Service
- equal:
path: metadata.name
value: RELEASE-NAME-ingress-nginx-controller-internal
value: RELEASE-NAME-open-appsec-k8s-nginx-ingress-controller-internal

View File

@ -20,4 +20,4 @@ tests:
of: Service
- equal:
path: metadata.name
value: RELEASE-NAME-ingress-nginx-controller-metrics
value: RELEASE-NAME-open-appsec-k8s-nginx-ingress-controller-metrics

View File

@ -20,7 +20,7 @@ tests:
of: Service
- equal:
path: metadata.name
value: RELEASE-NAME-ingress-nginx-controller
value: RELEASE-NAME-open-appsec-k8s-nginx-ingress-controller
- it: should create a Service of type "NodePort" if `controller.service.external.enabled` is true and `controller.service.type` is "NodePort"
set:

View File

@ -20,7 +20,7 @@ tests:
of: Service
- equal:
path: metadata.name
value: RELEASE-NAME-ingress-nginx-defaultbackend
value: RELEASE-NAME-open-appsec-k8s-nginx-ingress-defaultbackend
- it: should create a Service with port 80 if `defaultBackend.service.port` is 80
set: