File tree Expand file tree Collapse file tree 6 files changed +46
-3
lines changed
Expand file tree Collapse file tree 6 files changed +46
-3
lines changed Original file line number Diff line number Diff line change 66DOCKER_HELM_UNITITEST_IMAGE := helmunittest/helm-unittest:3.16.1-0.6.3
77LOCAL_UNIT_TEST := $(HOME ) /source/self/go-workshop/helm-unittest-tmp/untt
88
9- ISSUE := issue-457
9+ ISSUE := issue-471
1010
1111SUPPORTED := chart \
1212 issue-156 \
@@ -34,7 +34,8 @@ SUPPORTED := chart \
3434 issue-431 \
3535 issue-x \
3636 issue-351 \
37- issue-457
37+ issue-457 \
38+ issue-471
3839
3940FILTER_FOLDER := $(filter $(folder ) ,$(SUPPORTED ) )
4041
@@ -93,7 +94,10 @@ template: ## Helm template to validate
9394 @helm template namespaces $(ISSUE ) \
9495 --output-dir .output \
9596 --debug \
96- --values $(ISSUE ) /values.yaml
97+ --values $(ISSUE ) /values.yaml \
98+ --set hosts[0]=abrakadabra.local \
99+ --set hosts[2]=abrakadabra-v2.local \
100+ --set hostsMap[1].attribute=new-attribute1
97101
98102deps : # # Helm dependencies
99103 @helm dependency build $(ISSUE )
Original file line number Diff line number Diff line change 1+ apiVersion : v2
2+ description : An example chart with customized subchart
3+ name : with-subchart
4+ version : 0.1.0
5+ issueLink : https://github.com/helm-unittest/helm-unittest/issues/471
6+ supportedLinks :
7+ - https://codeberg.org/forgejo-contrib/forgejo-helm
8+ todo :
9+ - make sure set values in root level
Original file line number Diff line number Diff line change 1+
2+ # - matchSnapshot: {}
Original file line number Diff line number Diff line change 1+ anArray : {{ .Values.hosts }}
2+ anArrayValues :
3+ {{- range $host := .Values.hosts }}
4+ - host : {{ $host }}
5+ {{- end }}
6+
7+ # test
8+ anHostMap :
9+ {{- range $el := .Values.hostsMap }}
10+ - name : {{ $el.name }}
11+ attribute : {{ $el.attribute }}
12+ {{- end -}}
Original file line number Diff line number Diff line change 1+ suite : just a test
2+ templates :
3+ - template.yaml
4+ chart :
5+ version : 1.2.3
6+ tests :
7+ - it : paradox
Original file line number Diff line number Diff line change 1+ hosts :
2+ - chart-example.local
3+ - chart-example.remote
4+
5+ hostsMap :
6+ - name : value0
7+ attribute : attribute0
8+ - name : value1
9+ attribute : attribute1
You can’t perform that action at this time.
0 commit comments