-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude some keys during snapshot testing #197
Comments
Hello @denisbrainyyack, I will look into this. Greetings, |
Hello @quintush, I'll add some context about our case. We have a library chart and several application charts that we build based on the library chart. When developing a library chart, we do not use snapshot testing, but for application charts we use snapshot testing to control changes in default values, dependency versions, etc. Some application charts may consist of several sub-charts and that in total gives more than 50 documents. It looks like using the path key is not suitable in this case. I would like to take this opportunity to thank you for your great work! |
Until we can have this feat, I did a small workaround in
and then I use it in my annotation: helm.sh/chart: {{ include "mychart.version" . }} Finally, in the values I give to unittest, I have # this is only to make snapshot work
unittestChartVersion: 0.0.1-unittest |
Alternatively, you might simply implement some "switch variable", for instance |
During the snapshot testing, we want to ignore some document keys that are important during the deployment of the chart, but are not important during development. For example, the key
helm.sh/chart
, which is updated every time we update the version field in Chart.yaml.It would be great if it were possible to specify such a configuration:
Expecting that in this case the snapshot would not contain keys with that name.
The text was updated successfully, but these errors were encountered: