Add more unit tests to helm chart (#10731)
* Add more unit tests to helm chart Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com> * Apply suggestions from code review Co-authored-by: Marco Ebert <marco_ebert@icloud.com> * Apply suggestions from code review Co-authored-by: Marco Ebert <marco_ebert@icloud.com> * Apply suggestions from code review Co-authored-by: Marco Ebert <marco_ebert@icloud.com> * Use upstream helm-unittest repository Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com> * Remove non existing value from controller unittest Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com> * fix unit test Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com> * Apply suggestions from code review Co-authored-by: Marco Ebert <marco_ebert@icloud.com> * Apply suggestions from code review Co-authored-by: Marco Ebert <marco_ebert@icloud.com> --------- Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com> Co-authored-by: Marco Ebert <marco_ebert@icloud.com>
This commit is contained in:
parent
6ff70f015d
commit
be7f508c73
13 changed files with 288 additions and 1 deletions
32
charts/ingress-nginx/tests/controller-service_test.yaml
Normal file
32
charts/ingress-nginx/tests/controller-service_test.yaml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
suite: Controller > Service
|
||||
templates:
|
||||
- controller-service.yaml
|
||||
|
||||
tests:
|
||||
- it: should not create a Service if `controller.service.external.enabled` is false
|
||||
set:
|
||||
controller.service.external.enabled: false
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 0
|
||||
|
||||
- it: should create a Service if `controller.service.external.enabled` is true
|
||||
set:
|
||||
controller.service.external.enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- isKind:
|
||||
of: Service
|
||||
- equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-ingress-nginx-controller
|
||||
|
||||
- it: should create a Service of type "NodePort" if `controller.service.external.enabled` is true and `controller.service.type` is "NodePort"
|
||||
set:
|
||||
controller.service.enabled: true
|
||||
controller.service.type: NodePort
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.type
|
||||
value: NodePort
|
||||
Loading…
Add table
Add a link
Reference in a new issue