File tree Expand file tree Collapse file tree 7 files changed +109
-17
lines changed
Expand file tree Collapse file tree 7 files changed +109
-17
lines changed Original file line number Diff line number Diff line change 11apiVersion : v2
22description : An example chart with customized subchart
3- name : with-subchart
3+ name : array-substitution
44version : 0.1.0
55issueLink : https://github.com/helm-unittest/helm-unittest/issues/471
66supportedLinks :
Original file line number Diff line number Diff line change 11
22# - matchSnapshot: {}
3+
4+ bug
5+ ```
6+ path: hosts[1] values: hotpatch
7+ 287 setMap: map[hosts:[<nil> hotpatch]]
8+ ```
Original file line number Diff line number Diff line change 1+ {{- if .Values.ingress.enabled -}}
2+ apiVersion : extensions/v1beta1
3+ kind : Ingress
4+ metadata :
5+ name : ingress-under-test
6+ spec :
7+ rules :
8+ {{- range $host := .Values.ingress.hosts }}
9+ - host : {{ $host }}
10+ http :
11+ paths :
12+ - path : /
13+ backend :
14+ serviceName : my-test-service
15+ {{- end -}}
16+ {{- end -}}
Original file line number Diff line number Diff line change 1+ first test :
2+ 1 : |
3+ apiVersion : extensions / v1beta1
4+ kind : Ingress
5+ metadata :
6+ name : ingress - under - test
7+ spec :
8+ rules :
9+ - host : chart - example .local
10+ http :
11+ paths :
12+ - backend :
13+ serviceName : my - test - service
14+ path : /
15+ job level override test :
16+ 1 : |
17+ apiVersion : extensions / v1beta1
18+ kind : Ingress
19+ metadata :
20+ name : ingress - under - test
21+ spec :
22+ rules :
23+ - host : chart - example .local
24+ http :
25+ paths :
26+ - backend :
27+ serviceName : my - test - service
28+ path : /
Original file line number Diff line number Diff line change 11suite : just a test
22templates :
33- simple.yaml
4+ set :
5+ hosts[1] : SUITE-host-set-1
6+ ingress :
7+ hosts[1] : SUITE-example.local-1
48tests :
59 - it : paradox
610 template : simple.yaml
7- set :
8- hosts[1] : hotpatch
11+ # set:
12+ # hosts[1]: job-host-set-1
913 asserts :
10- - notEqual :
11- path : anArrayValues.rules[0].host
12- value : null
14+ # - notEqual:
15+ # path: anArrayValues.rules[0].host
16+ # value: null
1317 - equal :
1418 path : anArrayValues.rules
1519 value :
16- - host : null
17- - host : hotpatch1
18- - equal :
19- path : anArrayValues.rules[1].host
20- value : hotpatch
20+ - host : chart-example.local
21+ - host : SUITE-host-set-1
22+ # - equal:
23+ # path: anArrayValues.rules
24+ # value:
25+ # - host: null
26+ # - host: hotpatch1
27+ # - equal:
28+ # path: anArrayValues.rules[1].host
29+ # value: hotpatch
Original file line number Diff line number Diff line change 1+ suite : ingress under
2+ templates :
3+ - ingress.yaml
4+ set :
5+ ingress :
6+ enabled : true
7+ hosts[1] : chart-example.suite-level
8+ tests :
9+ - it : first test
10+ set :
11+ ingress :
12+ enabled : true
13+ hosts[1] : chart-example.job-level
14+ asserts :
15+ - matchSnapshot : {}
16+ - exists :
17+ path : spec.rules[?(@.host == "chart-example.local")]
18+
19+ - it : job level override test
20+ # set:
21+ # ingress:
22+ # hosts[1]: chart-example.job-level
23+ asserts :
24+ - matchSnapshot : {}
25+ - exists :
26+ path : spec.rules[?(@.host == "chart-example.local")]
27+ - exists :
28+ path : spec.rules[?(@.host == "chart-example.job-level")]
Original file line number Diff line number Diff line change 11hosts :
2- - chart-example.local
2+ - chart-hosts- example.local
33- chart-example.remote
44
5- hostsMap :
6- - name : value0
7- attribute : attribute0
8- - name : value1
9- attribute : attribute1
5+ # tests:
6+ # hostsMap:
7+ # - name: value0
8+ # attribute: attribute0
9+ # - name: value1
10+ # attribute: attribute1
11+
12+ ingress :
13+ hosts :
14+ - chart-ingress-example.local
You can’t perform that action at this time.
0 commit comments