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

OZG-3328 combine some helm tests and renamed some helm test suites

parent e549193c
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,8 @@ tests: ...@@ -33,6 +33,8 @@ tests:
asserts: asserts:
- isKind: - isKind:
of: ConfigMap of: ConfigMap
- isAPIVersion:
of: v1
- equal: - equal:
path: metadata.name path: metadata.name
value: bindings-type value: bindings-type
......
...@@ -6,4 +6,3 @@ set -x ...@@ -6,4 +6,3 @@ set -x
helm template ./src/main/helm/ -f src/test/helm-linter-values.yaml helm template ./src/main/helm/ -f src/test/helm-linter-values.yaml
helm lint -f src/test/helm-linter-values.yaml ./src/main/helm/ 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' .
#
# 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
...@@ -49,3 +49,17 @@ tests: ...@@ -49,3 +49,17 @@ tests:
- equal: - equal:
path: spec.template.spec.terminationGracePeriodSeconds path: spec.template.spec.terminationGracePeriodSeconds
value: 30 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
...@@ -35,8 +35,6 @@ tests: ...@@ -35,8 +35,6 @@ tests:
asserts: asserts:
- isAPIVersion: - isAPIVersion:
of: networking.k8s.io/v1 of: networking.k8s.io/v1
- isKind:
of: NetworkPolicy
- it: should match kind - it: should match kind
set: set:
......
...@@ -29,7 +29,7 @@ release: ...@@ -29,7 +29,7 @@ release:
templates: templates:
- templates/service_monitor.yaml - templates/service_monitor.yaml
tests: tests:
- it: should have the label component with value vorgang-manager-service-monitor attached - it: should have basic info
asserts: asserts:
- isKind: - isKind:
of: ServiceMonitor of: ServiceMonitor
......
...@@ -22,19 +22,25 @@ ...@@ -22,19 +22,25 @@
# unter der Lizenz sind dem Lizenztext zu entnehmen. # unter der Lizenz sind dem Lizenztext zu entnehmen.
# #
suite: test deployment suite: test service
release: release:
name: vorgang-manager name: vorgang-manager
namespace: sh-helm-test namespace: sh-helm-test
templates: templates:
- templates/service.yaml - templates/service.yaml
tests: tests:
- it: should have the label component with value vorgang-manager-service attached - it: should have basic info
asserts: asserts:
- isKind: - isKind:
of: Service of: Service
- isAPIVersion: - isAPIVersion:
of: v1 of: v1
- equal:
path: metadata.name
value: vorgang-manager
- equal:
path: metadata.namespace
value: sh-helm-test
- it: should be of type ClusterIP - it: should be of type ClusterIP
asserts: asserts:
- equal: - equal:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment