diff --git a/run_helm_test.sh b/run_helm_test.sh index 2bae426e6327e0d169891a6cd4eec42cd5377d87..06fd77ba50697dea2885a278ba44350ac3ab6bef 100755 --- a/run_helm_test.sh +++ b/run_helm_test.sh @@ -5,4 +5,4 @@ set -x 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 -f '../../test/helm/**/*test.yaml' . \ No newline at end of file +cd src/main/helm && helm unittest -f '../../test/helm/**/*test.yaml' . \ No newline at end of file diff --git a/src/main/helm/templates/_helpers.tpl b/src/main/helm/templates/_helpers.tpl index d3319d470a404cdc82ea1f46d66de742c7b4662b..8df40f5edce01ba5adc176eb8f1d901dba08e350 100644 --- a/src/main/helm/templates/_helpers.tpl +++ b/src/main/helm/templates/_helpers.tpl @@ -50,7 +50,7 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }} {{- end -}} {{- define "app.ozgcloudEnvironment" -}} -{{- required "ozgcloud.environment muss angegeben sein" (.Values.ozgcloud).environment -}} +{{- required "ozgcloud.environment must be set" (.Values.ozgcloud).environment -}} {{- end -}} {{- define "app.vorgangManagerDatabase" -}} @@ -130,4 +130,20 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }} {{- define "app.elsterTransferOperatorNamespace" -}} {{- required "elsterTransferOperator.namespace must be set" (.Values.elsterTransferOperator).namespace -}} -{{- end -}} \ No newline at end of file +{{- end -}} + +{{- define "app.ozgcloudBezeichner" -}} +{{- required "ozgcloud.bezeichner must be set" (.Values.ozgcloud).bezeichner -}} +{{- end -}} + +{{- define "app.baseUrl" -}} +{{- required "baseUrl must be set" .Values.baseUrl }} +{{- end -}} + +{{- define "app.alfaHost" -}} +{{- if .Values.alfaHost -}} +{{ .Values.alfaHost | quote }} +{{- else -}} +{{ printf "https://%s.%s" (include "app.ozgcloudBezeichner" .) (include "app.baseUrl" .) }} +{{- end -}} +{{- end -}} diff --git a/src/main/helm/templates/deployment.yaml b/src/main/helm/templates/deployment.yaml index ba379a93e17e623cf46bbc3f6e05aa8750eacff8..65b3f7d2055109abff0eea24180293bbc85c5c0e 100644 --- a/src/main/helm/templates/deployment.yaml +++ b/src/main/helm/templates/deployment.yaml @@ -263,6 +263,11 @@ spec: value: "false" {{- end }} + - name: ozgcloud_alfa_host + value: {{ include "app.alfaHost" . }} + - name: ozgcloud_vorgangManager_serviceAddress + value: {{ include "app.ozgcloud_vorgangmanager_address" . }} + {{- if or (.Values.database).useExternal (.Values.ozgcloudProxyApi).apikey }} envFrom: {{- if (.Values.database).useExternal }} diff --git a/src/main/helm/values.yaml b/src/main/helm/values.yaml index 6a380e033dcf8986792b1e8b8ca9f92a4ab81a0c..e5d0d6e271c3ad94a4be75ee045b192fe42e2a3a 100644 --- a/src/main/helm/values.yaml +++ b/src/main/helm/values.yaml @@ -24,8 +24,6 @@ cluster_env: "" -baseUrl: test.sh.ozg-cloud.de - replicaCount: 2 # ozgcloud: diff --git a/src/test/helm-linter-values.yaml b/src/test/helm-linter-values.yaml index 4ee02232ecd2a9c111ed1a6f0eaf7295f075700c..391e123d4eb232ee6dc4b036130c02bdb5a7bc8e 100644 --- a/src/test/helm-linter-values.yaml +++ b/src/test/helm-linter-values.yaml @@ -22,8 +22,12 @@ # unter der Lizenz sind dem Lizenztext zu entnehmen. # + +baseUrl: test.sh.ozg-cloud.de + ozgcloud: environment: test + bezeichner: helm infoManager: address: https://info-manager.my-wonderful-domain.local:9000 diff --git a/src/test/helm/deployment_63_chars_test.yaml b/src/test/helm/deployment_63_chars_test.yaml index a84ec6d6698acc0c874b72e9d5c76f425de07b7e..4ce95b672dfe95bd63951cdc2cca52f2e7d17c45 100644 --- a/src/test/helm/deployment_63_chars_test.yaml +++ b/src/test/helm/deployment_63_chars_test.yaml @@ -33,8 +33,10 @@ chart: templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: diff --git a/src/test/helm/deployment_actuator_test.yaml b/src/test/helm/deployment_actuator_test.yaml index b01fbbe154949e3b3198fc648fab4b1ce605c87a..25cad19b0f2237aa8a42b93cc675dfac12c0b65a 100644 --- a/src/test/helm/deployment_actuator_test.yaml +++ b/src/test/helm/deployment_actuator_test.yaml @@ -29,8 +29,10 @@ release: templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: - it: check readiness and startup probe diff --git a/src/test/helm/deployment_administration_address_env_test.yaml b/src/test/helm/deployment_administration_address_env_test.yaml index b2bf2db3eed725512711a2f11cf87727c94e78bd..e146aebc75545a2111517f1d96f1d01c195f3521 100644 --- a/src/test/helm/deployment_administration_address_env_test.yaml +++ b/src/test/helm/deployment_administration_address_env_test.yaml @@ -29,9 +29,11 @@ release: templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev - imagePullSecret: image-pull-secret + bezeichner: helm + imagePullSecret: test-image-pull-secret tests: - it: should have set administration server address set: diff --git a/src/test/helm/deployment_alfa_host_test.yaml b/src/test/helm/deployment_alfa_host_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2a17d3aafa95c7a6ed3bfad0b884ada19d0c4421 --- /dev/null +++ b/src/test/helm/deployment_alfa_host_test.yaml @@ -0,0 +1,71 @@ +# +# Copyright (C) 2022 Das Land Schleswig-Holstein vertreten durch den +# Ministerpräsidenten des Landes Schleswig-Holstein +# Staatskanzlei +# Abteilung Digitalisierung und zentrales IT-Management der Landesregierung +# +# Lizenziert unter der EUPL, Version 1.2 oder - sobald +# diese von der Europäischen Kommission genehmigt wurden - +# Folgeversionen der EUPL ("Lizenz"); +# Sie dürfen dieses Werk ausschließlich gemäß +# dieser Lizenz nutzen. +# Eine Kopie der Lizenz finden Sie hier: +# +# https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12 +# +# Sofern nicht durch anwendbare Rechtsvorschriften +# gefordert oder in schriftlicher Form vereinbart, wird +# die unter der Lizenz verbreitete Software "so wie sie +# ist", OHNE JEGLICHE GEWÄHRLEISTUNG ODER BEDINGUNGEN - +# ausdrücklich oder stillschweigend - verbreitet. +# Die sprachspezifischen Genehmigungen und Beschränkungen +# unter der Lizenz sind dem Lizenztext zu entnehmen. +# + +suite: test alfa host +release: + name: vorgang-manager + namespace: sh-helm-test +templates: + - templates/deployment.yaml +set: + ozgcloud: + environment: dev + imagePullSecret: test-image-pull-secret +tests: + - it: should set the alfa host + set: + baseUrl: test.sh.ozg-cloud.de + ozgcloud: + bezeichner: helm + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: ozgcloud_alfa_host + value: https://helm.test.sh.ozg-cloud.de + - it: should use alfa host from values + set: + baseUrl: test.sh.ozg-cloud.de + ozgcloud: + bezeichner: helm + alfaHost: https://hamburg.mein-kreis.de + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: ozgcloud_alfa_host + value: https://hamburg.mein-kreis.de + - it: should fail if bezeichner is not set + set: + baseUrl: test.sh.ozg-cloud.de + asserts: + - failedTemplate: + errorMessage: "ozgcloud.bezeichner must be set" + - it: should fail if base url is not set + set: + ozgcloud: + bezeichner: helm + asserts: + - failedTemplate: + errorMessage: "baseUrl must be set" diff --git a/src/test/helm/deployment_antragraum_test.yaml b/src/test/helm/deployment_antragraum_test.yaml index 0def5958d58429a5889774f8dc0c3cd49daff8cd..29ed00d4c4d008336993014f6b2defd03378fc51 100644 --- a/src/test/helm/deployment_antragraum_test.yaml +++ b/src/test/helm/deployment_antragraum_test.yaml @@ -29,9 +29,11 @@ release: templates: - templates/deployment.yaml set: - imagePullSecret: image-pull-secret + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm + imagePullSecret: test-image-pull-secret tests: - it: should set antragsraum values set: diff --git a/src/test/helm/deployment_bayernid_test.yaml b/src/test/helm/deployment_bayernid_test.yaml index 5b4837870b547f1c80384011bbf8dce8305eacc4..c11412aa8d089a95339f877ec6ee9b886dca25a9 100644 --- a/src/test/helm/deployment_bayernid_test.yaml +++ b/src/test/helm/deployment_bayernid_test.yaml @@ -29,8 +29,10 @@ 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 bayernid values diff --git a/src/test/helm/deployment_bindings_test.yaml b/src/test/helm/deployment_bindings_test.yaml index d4fa53ca7d43e4998315ec2cfb4f42bc5bd5e3de..51add5e564c008fd62e45d1837f0980bbf415edc 100644 --- a/src/test/helm/deployment_bindings_test.yaml +++ b/src/test/helm/deployment_bindings_test.yaml @@ -29,8 +29,10 @@ 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 have volumes diff --git a/src/test/helm/deployment_container_basic_test.yaml b/src/test/helm/deployment_container_basic_test.yaml index 876b4714aafe538e7c080057c54abd65bfac478d..2a36ac446ce27bebc8cf263c8cae80f677ed92cf 100644 --- a/src/test/helm/deployment_container_basic_test.yaml +++ b/src/test/helm/deployment_container_basic_test.yaml @@ -29,8 +29,10 @@ 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 have correct values for container image, name, imagePullPolicy diff --git a/src/test/helm/deployment_container_security_context_test.yaml b/src/test/helm/deployment_container_security_context_test.yaml index 11aef905bd2c4cbfe7fbcdd88ddaab437f0d4d4a..314103487abfd694e2d7b0bfd926cc3406da219e 100644 --- a/src/test/helm/deployment_container_security_context_test.yaml +++ b/src/test/helm/deployment_container_security_context_test.yaml @@ -29,8 +29,10 @@ release: templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: - it: check default values diff --git a/src/test/helm/deployment_defaults_labels_test.yaml b/src/test/helm/deployment_defaults_labels_test.yaml index 2cf86a63ea9c342d7c5f6553cbba061eb8e367af..7f7b80734a19b8d42384b5514cce435d853c2049 100644 --- a/src/test/helm/deployment_defaults_labels_test.yaml +++ b/src/test/helm/deployment_defaults_labels_test.yaml @@ -29,8 +29,10 @@ release: templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: - it: check default labels diff --git a/src/test/helm/deployment_defaults_topologySpreadConstraints_test.yaml b/src/test/helm/deployment_defaults_topologySpreadConstraints_test.yaml index b5e90a80698041766edbf65b61e54943b2a8f032..1a0ee0a3471584e577346c80cddc64b8417ab010 100644 --- a/src/test/helm/deployment_defaults_topologySpreadConstraints_test.yaml +++ b/src/test/helm/deployment_defaults_topologySpreadConstraints_test.yaml @@ -28,9 +28,11 @@ release: namespace: sh-helm-test templates: - templates/deployment.yaml -set: +set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: - environment: test + environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: diff --git a/src/test/helm/deployment_dummy_bescheid_document_test.yaml b/src/test/helm/deployment_dummy_bescheid_document_test.yaml index 8863f522e03eb89a1967528f116e5195ac42a473..74adfb830793a2a526fd820fee686f5334e2fab6 100644 --- a/src/test/helm/deployment_dummy_bescheid_document_test.yaml +++ b/src/test/helm/deployment_dummy_bescheid_document_test.yaml @@ -29,12 +29,14 @@ release: templates: - templates/deployment.yaml set: - imagePullSecret: image-pull-secret + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm feature: bescheid: enableDummyDocumentProcessor: true + imagePullSecret: image-pull-secret tests: - it: should enable dummy bescheid document processor asserts: diff --git a/src/test/helm/deployment_elasticsearch_test.yaml b/src/test/helm/deployment_elasticsearch_test.yaml index 2da7a513b36639efde128078b9fd5c0d0876c30e..453e2cc5ab01355042dd25ea6a3c8417023a563d 100644 --- a/src/test/helm/deployment_elasticsearch_test.yaml +++ b/src/test/helm/deployment_elasticsearch_test.yaml @@ -26,8 +26,10 @@ suite: elasticsearch tests templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: - it: check if elastic credentials are disabled by default diff --git a/src/test/helm/deployment_env_test.yaml b/src/test/helm/deployment_env_test.yaml index 4d71e36a71fcb5da19e5c6b55afd44ad528bcbd8..2a98ced7a604f37a24d566fc1de958738e3feef7 100644 --- a/src/test/helm/deployment_env_test.yaml +++ b/src/test/helm/deployment_env_test.yaml @@ -26,8 +26,10 @@ suite: test environments templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: - it: check customList as list diff --git a/src/test/helm/deployment_grpc_info_manager_address_test.yaml b/src/test/helm/deployment_grpc_info_manager_address_test.yaml index 763578ba556ba1c456cdfa7f9d5969b818d13119..81185b9711dc253c84c8bdd895cea61418fc8a77 100644 --- a/src/test/helm/deployment_grpc_info_manager_address_test.yaml +++ b/src/test/helm/deployment_grpc_info_manager_address_test.yaml @@ -28,14 +28,18 @@ release: namespace: sh-helm-test 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 grpc info-manager client address set: ozgcloud: - environment: dev - infoManager: + infoManager: address: https://info-manager.my-wonderful-domain.local:9000 - imagePullSecret: test-image-pull-secret asserts: - contains: path: spec.template.spec.containers[0].env diff --git a/src/test/helm/deployment_grpc_tls_test.yaml b/src/test/helm/deployment_grpc_tls_test.yaml index 120c32436acb99bf04891c2911f0804077b7b862..fdcbab138b368b6ca8fbf56cc1aaa72a2ebec1bb 100644 --- a/src/test/helm/deployment_grpc_tls_test.yaml +++ b/src/test/helm/deployment_grpc_tls_test.yaml @@ -29,8 +29,10 @@ release: templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: - environment: test + environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: - it: should have volume for grpc-tls-cert diff --git a/src/test/helm/deployment_grpc_user_manager_address_test.yaml b/src/test/helm/deployment_grpc_user_manager_address_test.yaml index a26e7cb0ceed7622dd361937c32f5074b6e60567..12938cc05dd26ac4ec1112d1558469378329ed64 100644 --- a/src/test/helm/deployment_grpc_user_manager_address_test.yaml +++ b/src/test/helm/deployment_grpc_user_manager_address_test.yaml @@ -29,8 +29,10 @@ 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 grpc user-manager client address diff --git a/src/test/helm/deployment_host_aliases_test.yaml b/src/test/helm/deployment_host_aliases_test.yaml index 549c387c725ba385235a1a6389da8d67a4e22520..89fa7000ad445c84548af1eda4dde6442cd67e6a 100644 --- a/src/test/helm/deployment_host_aliases_test.yaml +++ b/src/test/helm/deployment_host_aliases_test.yaml @@ -29,8 +29,10 @@ 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 not set hostAliases diff --git a/src/test/helm/deployment_imagepull_secret_test.yaml b/src/test/helm/deployment_imagepull_secret_test.yaml index a509da8e68281789a9454d33c4c5e018a63698b4..bb794eb01101266269021e9624eed213be892544 100644 --- a/src/test/helm/deployment_imagepull_secret_test.yaml +++ b/src/test/helm/deployment_imagepull_secret_test.yaml @@ -29,8 +29,10 @@ release: templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm tests: - it: should set the imagePull secret set: diff --git a/src/test/helm/deployment_kiel_hackathon_route_test.yaml b/src/test/helm/deployment_kiel_hackathon_route_test.yaml index f7879e4739ff4b8a6c67770701492f7210790ce7..1c896feef4e68b7990b6356956f5c060163a6f3a 100644 --- a/src/test/helm/deployment_kiel_hackathon_route_test.yaml +++ b/src/test/helm/deployment_kiel_hackathon_route_test.yaml @@ -29,12 +29,14 @@ release: templates: - templates/deployment.yaml set: - imagePullSecret: image-pull-secret + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm feature: bescheid: kielHackathonRoute: true + imagePullSecret: test-image-pull-secret tests: - it: should enable kiel hackathon toggle asserts: diff --git a/src/test/helm/deployment_liveness_probe_test.yaml b/src/test/helm/deployment_liveness_probe_test.yaml index 6eb925f2db9adf6854a03cded85538fccb066d1f..9a5dddc4594e187c4d3f79bde205a828cee1f5d5 100644 --- a/src/test/helm/deployment_liveness_probe_test.yaml +++ b/src/test/helm/deployment_liveness_probe_test.yaml @@ -29,8 +29,10 @@ release: templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: - it: livenessProbe should be disabled by default diff --git a/src/test/helm/deployment_mongodb_test.yaml b/src/test/helm/deployment_mongodb_test.yaml index ad8a4cb17c47cdca0b5cc89daf2055ec9a24109e..5fa9fa8f938cba2b8372a3921dbd294de98d7519 100644 --- a/src/test/helm/deployment_mongodb_test.yaml +++ b/src/test/helm/deployment_mongodb_test.yaml @@ -26,8 +26,10 @@ suite: deployment test mongodb environments templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: - it: check mongodb default env diff --git a/src/test/helm/deployment_muk_test.yaml b/src/test/helm/deployment_muk_test.yaml index aeb0cd59e88df0196712fb836088d1faa2b468ff..bcc31dc748cb40fd1cbce571313b0439371222aa 100644 --- a/src/test/helm/deployment_muk_test.yaml +++ b/src/test/helm/deployment_muk_test.yaml @@ -29,8 +29,10 @@ 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 muk values diff --git a/src/test/helm/deployment_nachrichten_manager_address_test.yaml b/src/test/helm/deployment_nachrichten_manager_address_test.yaml index 67887800a93d5637f079a8aaed0ffa08e588a8af..f8d47d58caf12baf9146a23120f2a36b3cd89fa7 100644 --- a/src/test/helm/deployment_nachrichten_manager_address_test.yaml +++ b/src/test/helm/deployment_nachrichten_manager_address_test.yaml @@ -29,8 +29,10 @@ release: templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: - it: check if nachrichten-manager address is correct diff --git a/src/test/helm/deployment_pod_default_spec_values_test.yaml b/src/test/helm/deployment_pod_default_spec_values_test.yaml index 42f5e0771bff080656d567edd16939ab9a99c79a..8e541d2fadf893072a380985246cd306c344aed0 100644 --- a/src/test/helm/deployment_pod_default_spec_values_test.yaml +++ b/src/test/helm/deployment_pod_default_spec_values_test.yaml @@ -29,8 +29,10 @@ 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 have correct pod template values diff --git a/src/test/helm/deployment_rabbitmq_env_test.yaml b/src/test/helm/deployment_rabbitmq_env_test.yaml index 3adaadfd0c5356fca70a79477c7dfd801751512b..c1e4acfee0ffff9bf5994ae1fde5e8113698d027 100644 --- a/src/test/helm/deployment_rabbitmq_env_test.yaml +++ b/src/test/helm/deployment_rabbitmq_env_test.yaml @@ -26,8 +26,10 @@ suite: deployment test rabbitmq environments templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: - it: check rabbitmq spring env diff --git a/src/test/helm/deployment_resources_test.yaml b/src/test/helm/deployment_resources_test.yaml index 7a545c8e7563e05cf5b7853bc87718f4b90c2240..9f42d2ff6aaf4f2f30852ee60323d95ad9ab125c 100644 --- a/src/test/helm/deployment_resources_test.yaml +++ b/src/test/helm/deployment_resources_test.yaml @@ -28,8 +28,10 @@ release: templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: - it: test resources diff --git a/src/test/helm/deployment_service_account_test.yaml b/src/test/helm/deployment_service_account_test.yaml index ad44c8d08f82196b65ff240d7db8bde467185be6..8a9de29bc8720fc291bc9a30b00f96415dd41f75 100644 --- a/src/test/helm/deployment_service_account_test.yaml +++ b/src/test/helm/deployment_service_account_test.yaml @@ -29,8 +29,10 @@ 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 use service account with default name diff --git a/src/test/helm/deployment_springProfile_env_test.yaml b/src/test/helm/deployment_springProfile_env_test.yaml index 7b24e13faf86d6f0adb38838aac3f548522724f3..f4cc5923d387f4a32d70c987b177a4eeca8f3fc4 100644 --- a/src/test/helm/deployment_springProfile_env_test.yaml +++ b/src/test/helm/deployment_springProfile_env_test.yaml @@ -28,8 +28,10 @@ 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 override spring profiles diff --git a/src/test/helm/deployment_test_ozgcloud_base_values_test.yaml b/src/test/helm/deployment_test_ozgcloud_base_values_test.yaml index e39659efbe0ffbbcfca957884cca18d73810f6e4..1b1e5f48bfd4a6d2d614387823f8cfee010bc7e7 100644 --- a/src/test/helm/deployment_test_ozgcloud_base_values_test.yaml +++ b/src/test/helm/deployment_test_ozgcloud_base_values_test.yaml @@ -28,14 +28,17 @@ release: namespace: sh-helm-test templates: - templates/deployment.yaml - +set: + baseUrl: test.sh.ozg-cloud.de + ozgcloud: + bezeichner: helm tests: - it: should fail on missing environment - set: + set: imagePullSecret: test-image-pull-secret asserts: - failedTemplate: - errorMessage: ozgcloud.environment muss angegeben sein + errorMessage: ozgcloud.environment must be set - it: should not fail on not missing environment and not missing imagepullsecret set: ozgcloud: diff --git a/src/test/helm/deployment_usermanager_url_env_test.yaml b/src/test/helm/deployment_usermanager_url_env_test.yaml index 5a2ac4d9af36586647ccaa20b863a38a735ff3d5..c0bcda1089f313b2ef38d9b4b443496b1ae5ffc6 100644 --- a/src/test/helm/deployment_usermanager_url_env_test.yaml +++ b/src/test/helm/deployment_usermanager_url_env_test.yaml @@ -29,8 +29,10 @@ release: templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: - it: check if user-manager url is correct diff --git a/src/test/helm/deployment_vorgang_manager_env_test.yaml b/src/test/helm/deployment_vorgang_manager_env_test.yaml index 4626fa9296378d85086ac3e15513241aa785e23d..140a1715ea26bb5a8f1d96510c2fea0590ec6350 100644 --- a/src/test/helm/deployment_vorgang_manager_env_test.yaml +++ b/src/test/helm/deployment_vorgang_manager_env_test.yaml @@ -29,8 +29,10 @@ release: templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: - it: check if application address is set diff --git a/src/test/helm/deployment_vorgang_manager_service_address_env_test.yaml b/src/test/helm/deployment_vorgang_manager_service_address_env_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..394dd179f926357fd825f8f16a08c0c252c6b658 --- /dev/null +++ b/src/test/helm/deployment_vorgang_manager_service_address_env_test.yaml @@ -0,0 +1,44 @@ +# +# Copyright (C) 2024 Das Land Schleswig-Holstein vertreten durch den +# Ministerpräsidenten des Landes Schleswig-Holstein +# Staatskanzlei +# Abteilung Digitalisierung und zentrales IT-Management der Landesregierung +# +# Lizenziert unter der EUPL, Version 1.2 oder - sobald +# diese von der Europäischen Kommission genehmigt wurden - +# Folgeversionen der EUPL ("Lizenz"); +# Sie dürfen dieses Werk ausschließlich gemäß +# dieser Lizenz nutzen. +# Eine Kopie der Lizenz finden Sie hier: +# +# https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12 +# +# Sofern nicht durch anwendbare Rechtsvorschriften +# gefordert oder in schriftlicher Form vereinbart, wird +# die unter der Lizenz verbreitete Software "so wie sie +# ist", OHNE JEGLICHE GEWÄHRLEISTUNG ODER BEDINGUNGEN - +# ausdrücklich oder stillschweigend - verbreitet. +# Die sprachspezifischen Genehmigungen und Beschränkungen +# unter der Lizenz sind dem Lizenztext zu entnehmen. +# + +suite: deployment vorgang manager service address environment +release: + name: vorgang-manager + namespace: by-helm-test +templates: + - templates/deployment.yaml +set: + baseUrl: test.sh.ozg-cloud.de + ozgcloud: + environment: dev + bezeichner: helm + imagePullSecret: test-image-pull-secret +tests: + - it: check if service address of vorgang manager is set + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: ozgcloud_vorgangManager_serviceAddress + value: dns:///vorgang-manager.by-helm-test:9090 \ No newline at end of file diff --git a/src/test/helm/deployment_zufimanager_address_env_test.yaml b/src/test/helm/deployment_zufimanager_address_env_test.yaml index d73c2e5b39e192cfe0f30908ccaa4c2d5d22fe1c..103ab80b241453c69e9cda99337afe387c36b898 100644 --- a/src/test/helm/deployment_zufimanager_address_env_test.yaml +++ b/src/test/helm/deployment_zufimanager_address_env_test.yaml @@ -29,8 +29,10 @@ release: templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: - it: check default zufi-manager address diff --git a/src/test/helm/deyploment_basic_value_and_default_spec_test.yaml b/src/test/helm/deyploment_basic_value_and_default_spec_test.yaml index 76331e120081a0f27ce4b20a88ecb4d007ce3635..0a3a2db660c001fd8fe29ad37ae06310466f41bb 100644 --- a/src/test/helm/deyploment_basic_value_and_default_spec_test.yaml +++ b/src/test/helm/deyploment_basic_value_and_default_spec_test.yaml @@ -29,8 +29,10 @@ release: templates: - templates/deployment.yaml set: + baseUrl: test.sh.ozg-cloud.de ozgcloud: environment: dev + bezeichner: helm imagePullSecret: test-image-pull-secret tests: