mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release v2.3.0 (#228)
Signed-off-by: Christopher Larivière <lariviere.c@gmail.com> Co-authored-by: Christopher Larivière <lariviere.c@gmail.com>
This commit is contained in:
parent
8bfc33eb8a
commit
0eac5ba7d7
23 changed files with 638 additions and 17 deletions
111
charts/library/common-test/tests/pvc/datasource_test.yaml
Normal file
111
charts/library/common-test/tests/pvc/datasource_test.yaml
Normal file
|
@ -0,0 +1,111 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
||||
suite: pvc datasource
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
set:
|
||||
persistence.config.enabled: true
|
||||
asserts:
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
notExists:
|
||||
path: spec.dataSource
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
notExists:
|
||||
path: spec.dataSourceRef
|
||||
|
||||
- it: with dataSource should pass
|
||||
set:
|
||||
persistence.config:
|
||||
enabled: true
|
||||
dataSource:
|
||||
apiGroup: snapshot.storage.k8s.io
|
||||
kind: VolumeSnapshot
|
||||
name: MySnapshot
|
||||
asserts:
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: spec.dataSource
|
||||
value:
|
||||
apiGroup: snapshot.storage.k8s.io
|
||||
kind: VolumeSnapshot
|
||||
name: MySnapshot
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
notExists:
|
||||
path: spec.dataSourceRef
|
||||
|
||||
- it: templated dataSource name should pass
|
||||
set:
|
||||
persistence.config:
|
||||
enabled: true
|
||||
dataSource:
|
||||
apiGroup: snapshot.storage.k8s.io
|
||||
kind: VolumeSnapshot
|
||||
name: "{{ .Release.Name }}-config"
|
||||
asserts:
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: spec.dataSource
|
||||
value:
|
||||
apiGroup: snapshot.storage.k8s.io
|
||||
kind: VolumeSnapshot
|
||||
name: RELEASE-NAME-config
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
notExists:
|
||||
path: spec.dataSourceRef
|
||||
|
||||
- it: with dataSourceRef should pass
|
||||
set:
|
||||
persistence.config:
|
||||
enabled: true
|
||||
dataSourceRef:
|
||||
apiGroup: snapshot.storage.k8s.io
|
||||
kind: VolumeSnapshot
|
||||
name: MySnapshot
|
||||
asserts:
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: spec.dataSourceRef
|
||||
value:
|
||||
apiGroup: snapshot.storage.k8s.io
|
||||
kind: VolumeSnapshot
|
||||
name: MySnapshot
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
notExists:
|
||||
path: spec.dataSource
|
||||
|
||||
- it: templated dataSourceRef name should pass
|
||||
set:
|
||||
persistence.config:
|
||||
enabled: true
|
||||
dataSourceRef:
|
||||
apiGroup: snapshot.storage.k8s.io
|
||||
kind: VolumeSnapshot
|
||||
name: "{{ .Release.Name }}-config"
|
||||
asserts:
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: spec.dataSourceRef
|
||||
value:
|
||||
apiGroup: snapshot.storage.k8s.io
|
||||
kind: VolumeSnapshot
|
||||
name: RELEASE-NAME-config
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
notExists:
|
||||
path: spec.dataSource
|
Loading…
Add table
Add a link
Reference in a new issue