Skip to content
Snippets Groups Projects
Commit 5199fe3b authored by OZGCloud's avatar OZGCloud
Browse files

Merge branch 'master' into OZG-4797-FormSolutions-Datenrepraesentation-kommen-in-Alfa-nicht-mehr-an

parents 82e2b119 f8b497ee
No related branches found
No related tags found
No related merge requests found
......@@ -134,11 +134,9 @@ pipeline {
FAILED_STAGE=env.STAGE_NAME
HELM_CHART_VERSION = generateHelmChartVersion()
dir('src/main/helm') {
sh "helm lint -f ../../test/helm-linter-values.yaml"
sh "helm unittest --helm3 -f '../../test/helm/*.yaml' -v '../../test/unit-values.yaml' ."
sh "./run_helm_test.sh"
dir('src/main/helm') {
sh "helm package --version=${HELM_CHART_VERSION} ."
deployHelmChart("Intelliform-Adapter", HELM_CHART_VERSION)
......@@ -152,12 +150,12 @@ pipeline {
script {
FAILED_STAGE=env.STAGE_NAME
HELM_CHART_VERSION = generateHelmChartVersion()
dir('xta-adapter') {
sh "./run_helm_test.sh"
}
dir('xta-adapter/src/main/helm') {
sh "helm lint -f test-values.yaml"
sh "helm unittest --helm3 -f '../../test/helm/*.yaml' -v '../../test/helm/values/unit-values.yaml' ."
sh "helm package --version=${HELM_CHART_VERSION} ."
deployHelmChart("xta-adapter", HELM_CHART_VERSION)
......
......@@ -4,4 +4,4 @@ set -e
helm template ./src/main/helm/ -f src/test/helm-linter-values.yaml
helm lint -f src/test/helm-linter-values.yaml ./src/main/helm/
cd src/main/helm && helm unittest --helm3 -f '../../test/helm/*.yaml' -v '../../test/unit-values.yaml' .
\ No newline at end of file
cd src/main/helm && helm unittest -f '../../test/helm/*.yaml' -v '../../test/unit-values.yaml' .
\ No newline at end of file
......@@ -34,14 +34,14 @@ tests:
- it: check default labels
asserts:
- equal:
path: metadata.labels.[app.kubernetes.io/instance]
path: metadata.labels["app.kubernetes.io/instance"]
value: afm-adapter
- equal:
path: metadata.labels.[app.kubernetes.io/name]
path: metadata.labels["app.kubernetes.io/name"]
value: intelliform-adapter
- equal:
path: metadata.labels.[app.kubernetes.io/part-of]
path: metadata.labels["app.kubernetes.io/part-of"]
value: ozgcloud
- equal:
path: metadata.labels.[app.kubernetes.io/namespace]
path: metadata.labels["app.kubernetes.io/namespace"]
value: sh-helm-test
......@@ -47,7 +47,7 @@ tests:
path: metadata.namespace
value: helm-test
- isNotEmpty:
path: data.[.dockerconfigjson]
path: data[".dockerconfigjson"]
- it: should not create image pull secret
set:
......
......@@ -52,8 +52,9 @@ tests:
value: intelliform-adapter
- it: should match service path
asserts:
- isEmpty:
- equal:
path: spec.rules[0].http.paths[0].path
value: ''
- it: should match service pathType
asserts:
- equal:
......@@ -106,7 +107,7 @@ tests:
- it: should use letsencrypt-prod cluster-issuer as default
asserts:
- equal:
path: metadata.annotations.[cert-manager.io/cluster-issuer]
path: metadata.annotations["cert-manager.io/cluster-issuer"]
value: letsencrypt-prod
- it: should use letsencrypt-staging cluster-issuer if use_staging_cert is true
......@@ -114,7 +115,7 @@ tests:
ingress.use_staging_cert: true
asserts:
- equal:
path: metadata.annotations.[cert-manager.io/cluster-issuer]
path: metadata.annotations["cert-manager.io/cluster-issuer"]
value: letsencrypt-staging
- it: should use letsencrypt-prod cluster-issuer if use_staging_cert is false
......@@ -122,10 +123,10 @@ tests:
ingress.use_staging_cert: false
asserts:
- equal:
path: metadata.annotations.[cert-manager.io/cluster-issuer]
path: metadata.annotations["cert-manager.io/cluster-issuer"]
value: letsencrypt-prod
- it: should set proxy body size to 42m
asserts:
- equal:
path: metadata.annotations.[nginx.ingress.kubernetes.io/proxy-body-size]
path: metadata.annotations["nginx.ingress.kubernetes.io/proxy-body-size"]
value: 42m
\ No newline at end of file
......@@ -34,7 +34,7 @@ tests:
- isKind:
of: ServiceMonitor
- equal:
path: metadata.labels.[component]
path: metadata.labels["component"]
value: afm-adapter-service-monitor
- it: should have the metrics endpoint configured by default
set:
......@@ -64,13 +64,13 @@ tests:
- it: selector should contain the component label with the value afm-adapter-service
asserts:
- equal:
path: spec.selector.matchLabels.[component]
path: spec.selector.matchLabels["component"]
value: afm-adapter-service
- it: selector should contain helm recommended labels name and namespace
asserts:
- equal:
path: spec.selector.matchLabels.[app.kubernetes.io/name]
path: spec.selector.matchLabels["app.kubernetes.io/name"]
value: afm-adapter
- equal:
path: spec.selector.matchLabels.[app.kubernetes.io/namespace]
path: spec.selector.matchLabels["app.kubernetes.io/namespace"]
value: sh-helm-test
......@@ -34,7 +34,7 @@ tests:
- isKind:
of: Service
- equal:
path: metadata.labels.[component]
path: metadata.labels["component"]
value: afm-adapter-service
- it: should be of type ClusterIP
asserts:
......@@ -50,8 +50,8 @@ tests:
port: 8080
protocol: TCP
targetPort: 8080
count: 1
any: true
count: 1
any: true
- it: ports should contain the metrics port
asserts:
- contains:
......@@ -60,19 +60,19 @@ tests:
name: metrics
port: 8081
protocol: TCP
count: 1
any: true
count: 1
any: true
- it: selector should contain the component label with the value afm-adapter
asserts:
- equal:
path: spec.selector.[component]
path: spec.selector["component"]
value: afm-adapter
- it: selector should contain helm recommended labels name and namespace
asserts:
- equal:
path: spec.selector.[app.kubernetes.io/name]
path: spec.selector["app.kubernetes.io/name"]
value: afm-adapter
- equal:
path: spec.selector.[app.kubernetes.io/namespace]
path: spec.selector["app.kubernetes.io/namespace"]
value: sh-helm-test
\ No newline at end of file
......@@ -4,4 +4,4 @@ set -e
helm template ./src/main/helm/ -f src/main/helm/test-values.yaml
helm lint -f src/test/helm/values/unit-values.yaml ./src/main/helm/
cd src/main/helm && helm unittest --helm3 -f '../../test/helm/*.yaml' -v '../../test/helm/values/unit-values.yaml' .
\ No newline at end of file
cd src/main/helm && helm unittest -f '../../test/helm/*.yaml' -v '../../test/helm/values/unit-values.yaml' .
\ No newline at end of file
......@@ -49,7 +49,7 @@ tests:
path: metadata.namespace
value: helm-test
- isNotEmpty:
path: data.[.dockerconfigjson]
path: data[".dockerconfigjson"]
- it: should not create image pull secret
set:
......
......@@ -44,6 +44,6 @@ tests:
path: metadata.namespace
value: helm-test
- equal:
path: data.[ca.crt]
path: data["ca.crt"]
value: Z2VoZWltCg==
......@@ -32,17 +32,17 @@ tests:
- it: check dummy livenessProbe default disabled
template: xta_adapter_cronjob.yaml
asserts:
- isEmpty:
- notExists:
path: spec.jobTemplate.spec.template.spec.containers[0].livenessProbe
- it: check dummy startupProbe default disabled
template: xta_adapter_cronjob.yaml
asserts:
- isEmpty:
- notExists:
path: spec.jobTemplate.spec.template.spec.containers[0].startupProbe
- it: check dummy readynessProbe default disabled
template: xta_adapter_cronjob.yaml
asserts:
- isEmpty:
- notExists:
path: spec.jobTemplate.spec.template.spec.containers[0].readinessProbe
- it: check dummy livenessProbe disabled
......@@ -50,21 +50,21 @@ tests:
set:
dummyProbesEnabled: false
asserts:
- isEmpty:
- notExists:
path: spec.jobTemplate.spec.template.spec.containers[0].livenessProbe
- it: check dummy startupProbe disabled
template: xta_adapter_cronjob.yaml
set:
dummyProbesEnabled: false
asserts:
- isEmpty:
- notExists:
path: spec.jobTemplate.spec.template.spec.containers[0].startupProbe
- it: check dummy readynessProbe disabled
template: xta_adapter_cronjob.yaml
set:
dummyProbesEnabled: false
asserts:
- isEmpty:
- notExists:
path: spec.jobTemplate.spec.template.spec.containers[0].readinessProbe
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment