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

OZG-7131 remove fachstelle host default value

parent 39b86cf3
No related branches found
No related tags found
No related merge requests found
......@@ -166,11 +166,7 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }}
{{- define "app.fachstelleHost" -}}
{{- if (.Values.fachstelle).enabled -}}
{{- if (.Values.fachstelle).host -}}
{{ (.Values.fachstelle).host | quote }}
{{- else -}}
{{ printf "https://fachstelle.%s" (include "app.baseUrl" .) }}
{{- end -}}
{{- required "fachstelle.host must be set" .Values.fachstelle.host | quote }}
{{- end -}}
{{- end -}}
......
......@@ -29,26 +29,14 @@ release:
templates:
- templates/deployment.yaml
set:
baseUrl: test.sh.ozg-cloud.de
ozgcloud:
environment: dev
bezeichner: helm
imagePullSecret: test-image-pull-secret
tests:
- it: should set the fachstelle host
- it: should set fachstelle host
set:
baseUrl: test.sh.ozg-cloud.de
fachstelle:
enabled: true
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: ozgcloud_fachstelle_host
value: https://fachstelle.test.sh.ozg-cloud.de
- it: should use fachstelle host from values
set:
baseUrl: test.sh.ozg-cloud.de
fachstelle:
enabled: true
host: https://hamburg.mein-kreis.de
......@@ -58,16 +46,14 @@ tests:
content:
name: ozgcloud_fachstelle_host
value: https://hamburg.mein-kreis.de
- it: should fail if base url is not set
- it: should fail if host url is not set
set:
fachstelle:
enabled: true
asserts:
- failedTemplate:
errorMessage: "baseUrl must be set"
- it: should not fail if fachstelle is not enabled and base url is not set
set:
alfaHost: alfa.de
errorMessage: "fachstelle.host must be set"
- it: should not fail if fachstelle is not enabled and host is not set
asserts:
- notContains:
path: spec.template.spec.containers[0].env
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment