mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat!: Rename common-chart to app-template
This commit is contained in:
parent
567577762f
commit
6a2bee4036
48 changed files with 70 additions and 70 deletions
106
charts/other/app-template/tests/pvc/metadata_test.yaml
Normal file
106
charts/other/app-template/tests/pvc/metadata_test.yaml
Normal file
|
@ -0,0 +1,106 @@
|
|||
suite: pvc metadata
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
set:
|
||||
persistence.config.enabled: true
|
||||
asserts:
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
isNull:
|
||||
path: metadata.annotations
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: app-template
|
||||
helm.sh/chart: app-template-0.1.0
|
||||
|
||||
- it: retain enabled should pass
|
||||
set:
|
||||
persistence.config:
|
||||
enabled: true
|
||||
retain: true
|
||||
asserts:
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: metadata.annotations
|
||||
value:
|
||||
helm.sh/resource-policy: keep
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: app-template
|
||||
helm.sh/chart: app-template-0.1.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
persistence.config:
|
||||
enabled: true
|
||||
labels:
|
||||
test_label: test
|
||||
annotations:
|
||||
test_annotation: test
|
||||
asserts:
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: metadata.annotations
|
||||
value:
|
||||
test_annotation: test
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: app-template
|
||||
helm.sh/chart: app-template-0.1.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
set:
|
||||
global:
|
||||
labels:
|
||||
global_label: test
|
||||
annotations:
|
||||
global_annotation: test
|
||||
persistence.config:
|
||||
enabled: true
|
||||
labels:
|
||||
test_label: test
|
||||
annotations:
|
||||
test_annotation: test
|
||||
asserts:
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: metadata.annotations
|
||||
value:
|
||||
test_annotation: test
|
||||
global_annotation: test
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: app-template
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-0.1.0
|
||||
test_label: test
|
66
charts/other/app-template/tests/pvc/names_test.yaml
Normal file
66
charts/other/app-template/tests/pvc/names_test.yaml
Normal file
|
@ -0,0 +1,66 @@
|
|||
suite: pvc names
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: disabled should pass
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
|
||||
- it: default should pass
|
||||
set:
|
||||
persistence.config.enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: 2
|
||||
not: true
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-app-template-config
|
||||
|
||||
- it: without suffix should pass
|
||||
set:
|
||||
persistence.config:
|
||||
enabled: true
|
||||
nameOverride: "-"
|
||||
asserts:
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-app-template
|
||||
|
||||
- it: with custom suffix should pass
|
||||
set:
|
||||
persistence.config:
|
||||
enabled: true
|
||||
nameOverride: "custom"
|
||||
asserts:
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-app-template-custom
|
42
charts/other/app-template/tests/pvc/storageclass_test.yaml
Normal file
42
charts/other/app-template/tests/pvc/storageclass_test.yaml
Normal file
|
@ -0,0 +1,42 @@
|
|||
suite: pvc storageclass
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
set:
|
||||
persistence.config.enabled: true
|
||||
asserts:
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
isNull:
|
||||
path: spec.storageClassName
|
||||
|
||||
- it: custom should pass
|
||||
set:
|
||||
persistence.config:
|
||||
enabled: true
|
||||
storageClass: custom
|
||||
asserts:
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: spec.storageClassName
|
||||
value: custom
|
||||
|
||||
- it: empty should pass
|
||||
set:
|
||||
persistence.config:
|
||||
enabled: true
|
||||
storageClass: "-"
|
||||
asserts:
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: spec.storageClassName
|
||||
value: ""
|
Loading…
Add table
Add a link
Reference in a new issue