Apply suggestions from code review
Co-authored-by: Marco Ebert <marco_ebert@icloud.com>
This commit is contained in:
parent
6c2abd653f
commit
459d60b049
6 changed files with 28 additions and 19 deletions
|
@ -1,19 +1,19 @@
|
|||
suite: test controller addHeaders configmap
|
||||
suite: Controller > ConfigMap > Add Headers
|
||||
templates:
|
||||
- controller-configmap-addheaders.yaml
|
||||
|
||||
tests:
|
||||
- it: should not create a configmap if addHeaders is not set
|
||||
- it: should not create a ConfigMap if `controller.addHeaders` is not set
|
||||
set:
|
||||
controller.addHeaders: null
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 0
|
||||
|
||||
- it: should create a configmap if addHeaders is set
|
||||
- it: should create a ConfigMap if `controller.addHeaders` is set
|
||||
set:
|
||||
controller.addHeaders:
|
||||
X-Another-Custom-Header: "Value"
|
||||
X-Another-Custom-Header: Value
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
|
@ -22,3 +22,6 @@ tests:
|
|||
- equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-ingress-nginx-custom-add-headers
|
||||
- equal:
|
||||
path: data.X-Another-Custom-Header
|
||||
value: Value
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
suite: test controller proxySetHeaders configmap
|
||||
suite: Controller > ConfigMap > Proxy Headers
|
||||
templates:
|
||||
- controller-configmap-proxyheaders.yaml
|
||||
|
||||
tests:
|
||||
- it: should not create a configmap if proxySetHeaders is not set
|
||||
- it: should not create a ConfigMap if `controller.proxySetHeaders` is not set
|
||||
set:
|
||||
controller.proxySetHeaders: null
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 0
|
||||
|
||||
- it: should create a configmap if proxySetHeaders is set
|
||||
- it: should create a ConfigMap if `controller.proxySetHeaders` is set
|
||||
set:
|
||||
controller.proxySetHeaders:
|
||||
X-Custom-Header: "Value"
|
||||
X-Custom-Header: Value
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
|
@ -22,3 +22,6 @@ tests:
|
|||
- equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-ingress-nginx-custom-proxy-headers
|
||||
- equal:
|
||||
path: data.X-Custom-Header
|
||||
value: Value
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
suite: test controller configmap
|
||||
suite: Controller > ConfigMap
|
||||
templates:
|
||||
- controller-configmap.yaml
|
||||
|
||||
tests:
|
||||
- it: should create a configmap
|
||||
- it: should create a ConfigMap
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- isKind:
|
||||
of: ConfigMap
|
||||
- equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-ingress-nginx
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
suite: test controller daemonset
|
||||
suite: Controller > DaemonSet
|
||||
templates:
|
||||
- controller-daemonset.yaml
|
||||
|
||||
tests:
|
||||
- it: should create a daemonset when controller kind is DaemonSet
|
||||
- it: should create a DaemonSet when `controller.kind` is "DaemonSet"
|
||||
set:
|
||||
controller.kind: DaemonSet
|
||||
asserts:
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
suite: test controller deployment
|
||||
suite: Controller > Deployment
|
||||
templates:
|
||||
- controller-deployment.yaml
|
||||
|
||||
tests:
|
||||
- it: should always create a deployment
|
||||
- it: should create a Deployment
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- isKind:
|
||||
of: Deployment
|
||||
|
||||
- it: custom replica count
|
||||
- it: should create a Deployment with 3 replicas when `controller.replicaCount` is 3
|
||||
set:
|
||||
controller.enabled: true
|
||||
controller.replicaCount: 3
|
||||
|
@ -19,15 +19,15 @@ tests:
|
|||
path: spec.replicas
|
||||
value: 3
|
||||
|
||||
- it: custom resource limits
|
||||
- it: should create a Deployment with resource limits when `controller.resources.limits` is set
|
||||
set:
|
||||
controller.enabled: true
|
||||
controller.resources.limits.cpu: "500m"
|
||||
controller.resources.limits.cpu: 500m
|
||||
controller.resources.limits.memory: "512Mi"
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].resources.limits.cpu
|
||||
value: "500m"
|
||||
value: 500m
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].resources.limits.memory
|
||||
value: "512Mi"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
suite: test controller hpa
|
||||
suite: Controller > HPA
|
||||
templates:
|
||||
- controller-hpa.yaml
|
||||
|
||||
|
|
Loading…
Reference in a new issue