mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
feat(common): Release v2.0.3 (#203)
Co-authored-by: JJGadgets <git@jjgadgets.tech> Co-authored-by: bjw-s-bot[bot] <87358111+bjw-s-bot[bot]@users.noreply.github.com>
This commit is contained in:
parent
f729651dbe
commit
ed015ee74b
12 changed files with 245 additions and 46 deletions
|
@ -38,6 +38,12 @@ tests:
|
|||
image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
tag: 30
|
||||
second:
|
||||
containers:
|
||||
first-container:
|
||||
image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
tag: 30
|
||||
|
||||
persistence:
|
||||
data:
|
||||
|
@ -54,37 +60,46 @@ tests:
|
|||
second-container:
|
||||
- path: /appdata/config
|
||||
readOnly: true
|
||||
second:
|
||||
first-container:
|
||||
- path: /second-pod/config.yaml
|
||||
readOnly: false
|
||||
subPath: config.yaml
|
||||
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
- documentIndex: &FirstDeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
- documentIndex: *FirstDeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].volumeMounts[0]
|
||||
path: spec.template.spec.containers[0].volumeMounts
|
||||
value:
|
||||
name: data
|
||||
mountPath: /globalTest
|
||||
- documentIndex: *DeploymentDoc
|
||||
- mountPath: /globalTest
|
||||
name: data
|
||||
- mountPath: /data/config.yaml
|
||||
name: data
|
||||
subPath: config.yaml
|
||||
- documentIndex: *FirstDeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].volumeMounts[1]
|
||||
path: spec.template.spec.containers[1].volumeMounts
|
||||
value:
|
||||
name: data
|
||||
mountPath: /data/config.yaml
|
||||
subPath: config.yaml
|
||||
- documentIndex: *DeploymentDoc
|
||||
- mountPath: /globalTest
|
||||
name: data
|
||||
- mountPath: /appdata/config
|
||||
name: data
|
||||
readOnly: true
|
||||
- documentIndex: &SecondDeploymentDoc 1
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *SecondDeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[1].volumeMounts[0]
|
||||
path: spec.template.spec.containers[0].volumeMounts
|
||||
value:
|
||||
name: data
|
||||
mountPath: /globalTest
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[1].volumeMounts[1]
|
||||
value:
|
||||
name: data
|
||||
mountPath: /appdata/config
|
||||
readOnly: true
|
||||
- mountPath: /globalTest
|
||||
name: data
|
||||
- mountPath: /second-pod/config.yaml
|
||||
name: data
|
||||
subPath: config.yaml
|
||||
|
||||
- it: emptyDir should pass
|
||||
set:
|
||||
|
|
109
charts/library/common-test/tests/persistence/volumes_test.yaml
Normal file
109
charts/library/common-test/tests/persistence/volumes_test.yaml
Normal file
|
@ -0,0 +1,109 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
||||
suite: persistence volumes
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: no persistence should pass
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
notExists:
|
||||
path: spec.template.spec.volumes
|
||||
|
||||
- it: default should pass
|
||||
set:
|
||||
persistence:
|
||||
config:
|
||||
enabled: true
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 1
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.volumes
|
||||
value:
|
||||
- name: config
|
||||
persistentVolumeClaim:
|
||||
claimName: RELEASE-NAME-config
|
||||
|
||||
- it: advanced mount config should pass
|
||||
set:
|
||||
controllers:
|
||||
main:
|
||||
containers:
|
||||
second-container:
|
||||
image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
tag: 30
|
||||
second:
|
||||
containers:
|
||||
first-container:
|
||||
image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
tag: 30
|
||||
|
||||
persistence:
|
||||
config:
|
||||
enabled: true
|
||||
existingClaim: test
|
||||
advancedMounts:
|
||||
main:
|
||||
main:
|
||||
- path: /config
|
||||
readOnly: false
|
||||
data:
|
||||
type: configMap
|
||||
name: myConfigMap
|
||||
globalMounts:
|
||||
- path: /globalTest
|
||||
advancedMounts:
|
||||
main:
|
||||
main:
|
||||
- path: /data/config.yaml
|
||||
readOnly: false
|
||||
subPath: config.yaml
|
||||
second-container:
|
||||
- path: /appdata/config
|
||||
readOnly: true
|
||||
second:
|
||||
first-container:
|
||||
- path: /second-pod/config.yaml
|
||||
readOnly: false
|
||||
subPath: config.yaml
|
||||
no-mounts:
|
||||
existingClaim: test
|
||||
|
||||
asserts:
|
||||
- documentIndex: &FirstDeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *FirstDeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.volumes
|
||||
value:
|
||||
- name: config
|
||||
persistentVolumeClaim:
|
||||
claimName: test
|
||||
- configMap:
|
||||
name: myConfigMap
|
||||
name: data
|
||||
- name: no-mounts
|
||||
persistentVolumeClaim:
|
||||
claimName: test
|
||||
- documentIndex: &SecondDeploymentDoc 1
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *SecondDeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.volumes
|
||||
value:
|
||||
- configMap:
|
||||
name: myConfigMap
|
||||
name: data
|
||||
- name: no-mounts
|
||||
persistentVolumeClaim:
|
||||
claimName: test
|
Loading…
Add table
Add a link
Reference in a new issue