mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
81 lines
2.2 KiB
YAML
81 lines
2.2 KiB
YAML
suite: service metadata
|
|
templates:
|
|
- common.yaml
|
|
tests:
|
|
- it: default metadata should pass
|
|
asserts:
|
|
- documentIndex: &ServiceDocument 1
|
|
isKind:
|
|
of: Service
|
|
- documentIndex: *ServiceDocument
|
|
isNull:
|
|
path: metadata.annotations
|
|
- documentIndex: *ServiceDocument
|
|
equal:
|
|
path: metadata.labels
|
|
value:
|
|
app.kubernetes.io/instance: RELEASE-NAME
|
|
app.kubernetes.io/managed-by: Helm
|
|
app.kubernetes.io/name: kah-common-chart
|
|
helm.sh/chart: kah-common-chart-1.1.2
|
|
|
|
- it: custom metadata should pass
|
|
set:
|
|
service:
|
|
main:
|
|
annotations:
|
|
test_annotation: test
|
|
labels:
|
|
test_label: test
|
|
asserts:
|
|
- documentIndex: &ServiceDocument 1
|
|
isKind:
|
|
of: Service
|
|
- documentIndex: *ServiceDocument
|
|
equal:
|
|
path: metadata.annotations
|
|
value:
|
|
test_annotation: test
|
|
- documentIndex: *ServiceDocument
|
|
equal:
|
|
path: metadata.labels
|
|
value:
|
|
app.kubernetes.io/instance: RELEASE-NAME
|
|
app.kubernetes.io/managed-by: Helm
|
|
app.kubernetes.io/name: kah-common-chart
|
|
helm.sh/chart: kah-common-chart-1.1.2
|
|
test_label: test
|
|
|
|
- it: custom metadata with global metadata should pass
|
|
set:
|
|
global:
|
|
labels:
|
|
global_label: test
|
|
annotations:
|
|
global_annotation: test
|
|
service:
|
|
main:
|
|
annotations:
|
|
test_annotation: test
|
|
labels:
|
|
test_label: test
|
|
asserts:
|
|
- documentIndex: &ServiceDocument 1
|
|
isKind:
|
|
of: Service
|
|
- documentIndex: *ServiceDocument
|
|
equal:
|
|
path: metadata.annotations
|
|
value:
|
|
global_annotation: test
|
|
test_annotation: test
|
|
- documentIndex: *ServiceDocument
|
|
equal:
|
|
path: metadata.labels
|
|
value:
|
|
app.kubernetes.io/instance: RELEASE-NAME
|
|
app.kubernetes.io/managed-by: Helm
|
|
app.kubernetes.io/name: kah-common-chart
|
|
global_label: test
|
|
helm.sh/chart: kah-common-chart-1.1.2
|
|
test_label: test
|