Closed obsidian33 closed 2 years ago
It appears that my issue was due to the dashes used to strip whitespace. I found this Helm lint error issue that prompted me to test various scenarios.
It's strange that the helm lint and template commands did not throw any errors at all but the tests started passing once I adjusted my deployment.yaml:
{{- range $deployment := .Values.deployments }}
{{- $name := (tpl $deployment.name $) }}
{{- $data := dict "name" $name "deployment" $deployment "Release" $.Release "Values" $.Values }}
{{ include "libchart.deployment" $data | nindent 0 }}
---
{{- end }}
I just started utilizing this helm plugin and everything was going great until I tried to test logic that creates multiple templates, in my test it is 2. Below are shortened versions of my files. When I run the
helm template
command I do have 2 deployment documents outputted.deployment_test.yaml
deployment.yaml
_deployment.yaml
When running the test I get: