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
An edge case, but one that comes up more then it should is the need to change the Chart name. This can cause issues if {{ .Chart.Name }} is used in an immutable part of the spec.
What should happen?
The .Chart.Name value should be override-able so that we can test various upgrade scenarios including cases where the chart name had to change.
What happens
You cannot override the chart version.
Example
An ideal test case is something like the following:
# This test has to be setup in a specific way to actually work the way we think.# 1) delete the existing `__snapshot__/deployment-immutable-fields_test.yaml`# 2) comment out the test `release` and `chart` section# 3) regen the first release snapshot by running `helm unittest -3 -f tests/deployment-immutable-fields_test.yaml msv-ripper`suite: immutable fields have not been changed on deployments# This are the things that change during an upgrade. Set to an initial valuerelease:
name: immutablenamespace: "ripper"revision: 0isUpgrade: falsecapabilities:
majorVersion: 1minorVersion: 22chart:
name: fooversion: 0.0.9appVersion: 0.0.9templates:
# List all the deployment fields here
- "amqp-deployment.yaml"tests:
- it: should not have the spec.selectorvalues:
- ../values.yamlasserts:
- matchSnapshot:
# This is the field to capture, that cannot changepath: spec.selector# The below are the items that can change in a given release.# Comment this out if re-generating the test snapshot file.release:
name: new-releaserevision: 1isUpgrade: truecapabilities:
majorVersion: 1minorVersion: 24chart:
name: ripperversion: 1.0.0appVersion: 1.0.0
The text was updated successfully, but these errors were encountered:
An edge case, but one that comes up more then it should is the need to change the Chart name. This can cause issues if
{{ .Chart.Name }}
is used in an immutable part of the spec.What should happen?
The
.Chart.Name
value should be override-able so that we can test various upgrade scenarios including cases where the chart name had to change.What happens
You cannot override the chart version.
Example
An ideal test case is something like the following:
The text was updated successfully, but these errors were encountered: