Open tomassatka opened 4 years ago
Library templates don't generate any input, so it is nog possible to unittest.
I have looked into it by parsing the script itself, bit this resulted in writing almost a complete copy of the actusl template parser.
Greeting @quintush
Maybe is better to call the plugin integrationtest instead of unittest... then less confusion and more precises .
could write another chart on the side that uses the library chart and put the tests there
The library chart can only be tested on a fake chart that uses the library. But this project could simplify a developers' lives by hiding this, i.e. detecting that current chart is a library and creating a fake chart behind the scene, with the library chart as dependency. Wdyt ?
The library chart can only be tested on a fake chart that uses the library. But this project could simplify a developers' lives by hiding this, i.e. detecting that current chart is a library and creating a fake chart behind the scene, with the library chart as dependency. Wdyt ?
I like this idea. Is this something we can get in a future release?
Hi Is it possible to write unittests for library chart? I know that user cant apply
helm template @chart
on library chart therefore not sure if it can be unit tested. Motivation behind is that libraries play crucial role as they contain common _helpers.tpl and therefore we would like to focus on unit testing it to assure the quality and compatibility with charts that depend on it.Any advice?
Example of tpl from library templates:
and test it with: