mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
feat(common): Release version 2.0.0-beta.1 (#173)
This commit is contained in:
parent
19767d668c
commit
7b6ee00be6
189 changed files with 3110 additions and 3023 deletions
|
@ -0,0 +1,93 @@
|
|||
suite: configmap metadata
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default metadata should pass
|
||||
set:
|
||||
configMaps:
|
||||
config:
|
||||
enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ConfigmapDocument 2
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *ConfigmapDocument
|
||||
isNull:
|
||||
path: metadata.annotations
|
||||
- documentIndex: *ConfigmapDocument
|
||||
equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: common-test-1.0.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
configMaps:
|
||||
config:
|
||||
enabled: true
|
||||
annotations:
|
||||
test_annotation: test
|
||||
labels:
|
||||
test_label: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ConfigmapDocument 2
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *ConfigmapDocument
|
||||
equal:
|
||||
path: metadata.annotations
|
||||
value:
|
||||
test_annotation: test
|
||||
- documentIndex: *ConfigmapDocument
|
||||
equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: common-test-1.0.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
set:
|
||||
global:
|
||||
labels:
|
||||
global_label: test
|
||||
annotations:
|
||||
global_annotation: test
|
||||
configMaps:
|
||||
config:
|
||||
enabled: true
|
||||
annotations:
|
||||
test_annotation: test
|
||||
labels:
|
||||
test_label: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ConfigmapDocument 2
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *ConfigmapDocument
|
||||
equal:
|
||||
path: metadata.annotations
|
||||
value:
|
||||
global_annotation: test
|
||||
test_annotation: test
|
||||
- documentIndex: *ConfigmapDocument
|
||||
equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: common-test-1.0.0
|
||||
test_label: test
|
91
charts/library/common-test/tests/configmap/names_test.yaml
Normal file
91
charts/library/common-test/tests/configmap/names_test.yaml
Normal file
|
@ -0,0 +1,91 @@
|
|||
suite: configMap names
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
|
||||
- it: with disabled configMap should pass
|
||||
set:
|
||||
configMaps:
|
||||
config:
|
||||
enabled: false
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
|
||||
- it: with multiple configMap should pass
|
||||
set:
|
||||
configMaps:
|
||||
config:
|
||||
enabled: true
|
||||
data:
|
||||
foo: bar
|
||||
secondary:
|
||||
enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
- documentIndex: &FirstConfigmapDocument 2
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *FirstConfigmapDocument
|
||||
isNotNull:
|
||||
path: metadata.name
|
||||
- documentIndex: &SecondConfigmapDocument 3
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *SecondConfigmapDocument
|
||||
isNotNull:
|
||||
path: metadata.name
|
||||
|
||||
- it: default name should pass
|
||||
set:
|
||||
configMaps:
|
||||
config:
|
||||
enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ConfigmapDocument 2
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *ConfigmapDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-config
|
||||
|
||||
- it: with nameOverride should pass
|
||||
set:
|
||||
configMaps:
|
||||
config:
|
||||
enabled: true
|
||||
nameOverride: http
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ConfigmapDocument 2
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *ConfigmapDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-http
|
|
@ -0,0 +1,20 @@
|
|||
suite: configmap Pod metadata
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default metadata should pass
|
||||
set:
|
||||
configMaps:
|
||||
config:
|
||||
enabled: true
|
||||
data:
|
||||
test: value 1
|
||||
asserts:
|
||||
- documentIndex: &ControllerDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *ControllerDoc
|
||||
equal:
|
||||
path: spec.template.metadata.annotations
|
||||
value:
|
||||
checksum/configMaps: afdf20f511621d5cb358c5e8b0da2d14cdbe2549fb12fa123f6a6e9baabef26e
|
Loading…
Add table
Add a link
Reference in a new issue