You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a weird issue in one of my tests: I'm testing, if that I can add additional files from a given path to a template. Manually I verified, that it works. But I cannot get my tests working. The file is never added.
I then checked, what the .Files known to the current context are. To do that I added the following to my template in test:
{{- fail (printf "files = %s" $.Files) }}
When I render the chart manually the fail message shows a couple of files (README.md, .helmignore and my unittestfiles/certificates/myCustomRootCA.pem).
When I execute my tests though, the error message is "files = map[]".
Is this by design? If not, is this a known issue?
The text was updated successfully, but these errors were encountered:
Sorry for the delayed response.
Can you add an example of the test that is being used?
When templates are defined in the test suite, all other files (except for the partial templates) are excluded, to ensure we don't get invalid rendered charst due to required fields in not part of the tested resources.
This behaviour could conflict with the $.Files, but I'm not sure yet.
I have a weird issue in one of my tests: I'm testing, if that I can add additional files from a given path to a template. Manually I verified, that it works. But I cannot get my tests working. The file is never added.
I then checked, what the
.Files
known to the current context are. To do that I added the following to my template in test:{{- fail (printf "files = %s" $.Files) }}
When I render the chart manually the fail message shows a couple of files (
README.md
,.helmignore
and myunittestfiles/certificates/myCustomRootCA.pem
).When I execute my tests though, the error message is "files = map[]".
Is this by design? If not, is this a known issue?
The text was updated successfully, but these errors were encountered: