Add unit tests for env, envFrom, st2.packs.images, and st2.packs.volumes by cognifloyd · Pull Request #292 · StackStorm/stackstorm-k8s
- add tests for env and envFrom
- test deployments and jobs with/out st2.packs.images and without st2.packs.volumes
- test deployments and jobs with/out st2.packs.images and with st2.packs.volumes
- test misconfigured st2.packs.volumes
Comment on lines +1967 to +1969
| {{- else }} | ||
| volumeMounts: [] | ||
| volumes: [] |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This simplified a chunk of the (already lengthy) volume tests.
| {{- end }} | ||
| {{- if $sensor.env }} | ||
| env: {{- include "stackstorm-ha.customEnv" . | nindent 8 }} | ||
| env: {{- include "stackstorm-ha.customEnv" $sensor | nindent 8 }} |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The env test caught this typo
@armab could you review this? It may be large, but that's because the unit tests are very repetitive to cover the various possibilities (helm-unittest doesn't have anything like pytest's parametrize).
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters