diff --git a/nachrichten-bayernid-proxy/src/test/helm/configmap_bindings_type_test.yaml b/nachrichten-bayernid-proxy/src/test/helm/configmap_bindings_type_test.yaml index 78236b32067b019da7497306962f0fd74d7d9307..e097f3b15d2c12e7043830c5ba2d794302f07da4 100644 --- a/nachrichten-bayernid-proxy/src/test/helm/configmap_bindings_type_test.yaml +++ b/nachrichten-bayernid-proxy/src/test/helm/configmap_bindings_type_test.yaml @@ -33,6 +33,8 @@ tests: asserts: - isKind: of: ConfigMap + - isAPIVersion: + of: v1 - equal: path: metadata.name value: bindings-type diff --git a/run_helm_test.sh b/run_helm_test.sh index 08bccc2c0621f2a7c960924c8bddf3187d0f2647..2bae426e6327e0d169891a6cd4eec42cd5377d87 100755 --- a/run_helm_test.sh +++ b/run_helm_test.sh @@ -5,5 +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' . - +cd src/main/helm && helm unittest -f '../../test/helm/**/*test.yaml' . \ No newline at end of file diff --git a/src/test/helm/deployment_container_other_values_test.yaml b/src/test/helm/deployment_container_other_values_test.yaml deleted file mode 100644 index 092139f30576e02675ecb912548cecc525ec82a8..0000000000000000000000000000000000000000 --- a/src/test/helm/deployment_container_other_values_test.yaml +++ /dev/null @@ -1,50 +0,0 @@ - - # -# 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: test deployment container other values -release: - name: vorgang-manager - namespace: sh-helm-test -templates: - - templates/deployment.yaml -set: - ozgcloud: - environment: dev - imagePullSecret: test-image-pull-secret -tests: - - it: should have correct values for container terminationMessagePolicy, terminationMessagePath, stdin, tty - asserts: - - equal: - path: spec.template.spec.containers[0].terminationMessagePolicy - value: File - - equal: - path: spec.template.spec.containers[0].terminationMessagePath - value: /dev/termination-log - - equal: - path: spec.template.spec.containers[0].stdin - value: true - - equal: - path: spec.template.spec.containers[0].tty - value: true \ No newline at end of file diff --git a/src/test/helm/deployment_pod_general_values_test.yaml b/src/test/helm/deployment_pod_default_spec_values_test.yaml similarity index 74% rename from src/test/helm/deployment_pod_general_values_test.yaml rename to src/test/helm/deployment_pod_default_spec_values_test.yaml index 1b5b4148e614705a25eec59af9ba1c3bb076aeff..42f5e0771bff080656d567edd16939ab9a99c79a 100644 --- a/src/test/helm/deployment_pod_general_values_test.yaml +++ b/src/test/helm/deployment_pod_default_spec_values_test.yaml @@ -48,4 +48,18 @@ tests: value: "default-scheduler" - equal: path: spec.template.spec.terminationGracePeriodSeconds - value: 30 \ No newline at end of file + value: 30 + - it: should have correct values for container terminationMessagePolicy, terminationMessagePath, stdin, tty + asserts: + - equal: + path: spec.template.spec.containers[0].terminationMessagePolicy + value: File + - equal: + path: spec.template.spec.containers[0].terminationMessagePath + value: /dev/termination-log + - equal: + path: spec.template.spec.containers[0].stdin + value: true + - equal: + path: spec.template.spec.containers[0].tty + value: true \ No newline at end of file diff --git a/src/test/helm/deyploment_general_value_test.yaml b/src/test/helm/deyploment_basic_value_and_default_spec_test.yaml similarity index 100% rename from src/test/helm/deyploment_general_value_test.yaml rename to src/test/helm/deyploment_basic_value_and_default_spec_test.yaml diff --git a/src/test/helm/network_policy_test.yaml b/src/test/helm/network_policy_test.yaml index 5728f2fc1bab9d58421e31d1f7235d840a54f12b..16661a34b0b43473c82029e7496f2867220dd785 100644 --- a/src/test/helm/network_policy_test.yaml +++ b/src/test/helm/network_policy_test.yaml @@ -35,8 +35,6 @@ tests: asserts: - isAPIVersion: of: networking.k8s.io/v1 - - isKind: - of: NetworkPolicy - it: should match kind set: diff --git a/src/test/helm/service_monitor_test.yaml b/src/test/helm/service_monitor_test.yaml index d25ceca7b423fd829bdd3432755087f90a1dc35f..8d1a5caad68d8bc907e066a49b64ae20f4888623 100644 --- a/src/test/helm/service_monitor_test.yaml +++ b/src/test/helm/service_monitor_test.yaml @@ -29,7 +29,7 @@ release: templates: - templates/service_monitor.yaml tests: - - it: should have the label component with value vorgang-manager-service-monitor attached + - it: should have basic info asserts: - isKind: of: ServiceMonitor diff --git a/src/test/helm/service_test.yaml b/src/test/helm/service_test.yaml index 91d54504614680cdb057bb36fb465bb48c93ef18..6ffb004080c0a7fcf55888124ba95b37ea4d9fc6 100644 --- a/src/test/helm/service_test.yaml +++ b/src/test/helm/service_test.yaml @@ -22,19 +22,25 @@ # unter der Lizenz sind dem Lizenztext zu entnehmen. # -suite: test deployment +suite: test service release: name: vorgang-manager namespace: sh-helm-test templates: - templates/service.yaml tests: - - it: should have the label component with value vorgang-manager-service attached + - it: should have basic info asserts: - isKind: of: Service - isAPIVersion: of: v1 + - equal: + path: metadata.name + value: vorgang-manager + - equal: + path: metadata.namespace + value: sh-helm-test - it: should be of type ClusterIP asserts: - equal: