
* 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>
27 lines
708 B
YAML
27 lines
708 B
YAML
suite: Controller > ConfigMap > Add Headers
|
|
templates:
|
|
- controller-configmap-addheaders.yaml
|
|
|
|
tests:
|
|
- 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 `controller.addHeaders` is set
|
|
set:
|
|
controller.addHeaders:
|
|
X-Another-Custom-Header: Value
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 1
|
|
- isKind:
|
|
of: ConfigMap
|
|
- equal:
|
|
path: metadata.name
|
|
value: RELEASE-NAME-ingress-nginx-custom-add-headers
|
|
- equal:
|
|
path: data.X-Another-Custom-Header
|
|
value: Value
|