feat: add unittest for storageClass and minor correction in helpers
credits go to: @benmonty
This commit is contained in:
@@ -46,7 +46,7 @@ Storage Class
|
||||
{{- $storageClass := default (tpl ( default "" .Values.global.storageClass) .) }}
|
||||
{{- if $storageClass }}
|
||||
storageClassName: {{ $storageClass | quote }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user