
* 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>
23 lines
622 B
YAML
23 lines
622 B
YAML
suite: Controller > NetworkPolicy
|
|
templates:
|
|
- controller-networkpolicy.yaml
|
|
|
|
tests:
|
|
- it: should not create a NetworkPolicy if `controller.networkPolicy.enabled` is false
|
|
set:
|
|
controller.networkPolicy.enabled: false
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 0
|
|
|
|
- it: should create a NetworkPolicy if `controller.networkPolicy.enabled` is true
|
|
set:
|
|
controller.networkPolicy.enabled: true
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 1
|
|
- isKind:
|
|
of: NetworkPolicy
|
|
- equal:
|
|
path: metadata.name
|
|
value: RELEASE-NAME-ingress-nginx-controller
|