feat: add unittest for storageClass and minor correction in helpers
Some checks failed
changelog / changelog (push) Has been cancelled
check-and-test / check-and-test (push) Has been cancelled

credits go to: @benmonty
This commit is contained in:
DaanSelen
2026-04-23 09:01:42 +02:00
parent 137b52a2d4
commit 2301e22e32
2 changed files with 13 additions and 1 deletions

View File

@ -46,7 +46,7 @@ Storage Class
{{- $storageClass := default (tpl ( default "" .Values.global.storageClass) .) }}
{{- if $storageClass }}
storageClassName: {{ $storageClass | quote }}
{{- end }}
{{- end -}}
{{- end -}}
{{/*

View File

@ -211,6 +211,18 @@ tests:
- equal:
path: spec.template.spec.runtimeClassName
value: "my-runtime-class-name"
- it: should render storageClass correctly
template: templates/statefulset.yaml
set:
enabled: true
global:
storageClass: "test-storageclass"
asserts:
- hasDocuments:
count: 1
- equal:
path: spec.volumeClaimTemplates[0].spec.storageClassName
value: "test-storageclass"
#
## ACT_RUNNER