rancher / hull

Keep your Helm charts afloat with comprehensive testing
Apache License 2.0
4 stars 5 forks source link

Add `lookup` and `.Capabilities` to coverage #5

Open aiyengar2 opened 2 years ago

aiyengar2 commented 2 years ago

When templates have special Helm actions like lookup or .Capabilities calls, these should be calculated as part of the unit testing coverage calculations to ensure that the chart is fully tested.

This would require introspecting the Helm templates that have been provided to understand what is specifically being queried against to include those as part of the coverage calculations.

Note: This is a fairly difficult problem to solve that I do not currently have a solution in mind for, so if there are any suggestions I'd appreciate it in the comments of this issue!

aiyengar2 commented 1 year ago

Addressed partially by https://github.com/aiyengar2/hull/pull/10, but our coverage does not currently support lookups and capabilities checks.

aiyengar2 commented 1 year ago

At the very least, we should be picking the references to these objects up and emit warnings whenever .Capabilities is used or .Release.IsUpgrade / .Release.IsInstall is used in a chart