rancher / hull

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

Refactor test.Suite to simplify usage #26

Closed aiyengar2 closed 1 year ago

aiyengar2 commented 1 year ago

Switches to a model where testers provide flat Checks and Cases (as opposed to Cases that nest Checks).

This is feasible with the introduction of the new pkg/extract library, which allows us to extract generic objects from paths in the rendered values that are now stored directly in the *checker.TestContext. As a result of this, you can now write NamedChecks (previously TemplateChecks) that are parametrized by the values.yaml via the use of checker.MustRenderValues / checker.RenderValues, which solves the need that the previous ValueChecks solved.

This is a big breaking change.