diff --git a/src/test/helm/deployment_database_test.yaml b/src/test/helm/deployment_database_test.yaml index bde6a7f20fcca8b5db8234965c1c38cad365f268..cacdf79003b44114c55787215b7f289793b8d59e 100644 --- a/src/test/helm/deployment_database_test.yaml +++ b/src/test/helm/deployment_database_test.yaml @@ -30,6 +30,11 @@ templates: - templates/deployment.yaml tests: - it: should have a volume for the mongodb certificate + set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm asserts: - contains: path: spec.template.spec.volumes @@ -39,6 +44,11 @@ tests: secretName: ozg-mongodb-tls-cert optional: true - it: should mount mongodb certificate volume + set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm asserts: - contains: path: spec.template.spec.containers[0].volumeMounts @@ -49,6 +59,10 @@ tests: readOnly: true - it: should configure internal mongodb if not useExternal set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm database.useExternal: false asserts: - contains: @@ -67,10 +81,14 @@ tests: value: administration-database - it: should configure external mongodb if useExternal set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm database.useExternal: true asserts: - contains: path: spec.template.spec.containers[0].envFrom content: secretRef: - name: administration-database-spring \ No newline at end of file + name: administration-database-spring diff --git a/src/test/helm/deployment_image_pull_secret_test.yaml b/src/test/helm/deployment_image_pull_secret_test.yaml index 7aea9cb83872375b74ff8f737eb6d2165d940093..5d64a85ca4ce6efdd6c550ed6743ccf41ccddd9b 100644 --- a/src/test/helm/deployment_image_pull_secret_test.yaml +++ b/src/test/helm/deployment_image_pull_secret_test.yaml @@ -29,6 +29,11 @@ release: namespace: helm-test tests: - it: should use default image pull secret + set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm asserts: - contains: path: spec.template.spec.imagePullSecrets @@ -36,9 +41,13 @@ tests: name: administration-image-pull-secret - it: should use customizable image pull secret set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm imagePullSecret: custom-image-pull-secret asserts: - contains: path: spec.template.spec.imagePullSecrets content: - name: custom-image-pull-secret \ No newline at end of file + name: custom-image-pull-secret diff --git a/src/test/helm/deployment_resources_test.yaml b/src/test/helm/deployment_resources_test.yaml index 29322c2183f84bf7515fff981bb1f4bc849c63f3..51763348f78c4bf13cefeb030152083c9fe52199 100644 --- a/src/test/helm/deployment_resources_test.yaml +++ b/src/test/helm/deployment_resources_test.yaml @@ -30,8 +30,12 @@ release: tests: - it: should have customizable resources set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm resources: { "test": 1 } asserts: - equal: path: spec.template.spec.containers[0].resources - value: { "test": 1 } \ No newline at end of file + value: { "test": 1 } diff --git a/src/test/helm/deployment_spring_profile_test.yaml b/src/test/helm/deployment_spring_profile_test.yaml index 35c8ad1d614d343022a87aff7bdabaf623082b10..74f1fe378bc3345fc0a20eb41289cef6400c6411 100644 --- a/src/test/helm/deployment_spring_profile_test.yaml +++ b/src/test/helm/deployment_spring_profile_test.yaml @@ -31,6 +31,10 @@ templates: tests: - it: should override the spring profiles set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm env.overrideSpringProfiles: oc,dev,ea asserts: - isKind: @@ -41,6 +45,11 @@ tests: name: spring_profiles_active value: oc,dev,ea - it: should generate the spring profiles + set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm asserts: - isKind: of: Deployment @@ -48,4 +57,4 @@ tests: path: spec.template.spec.containers[0].env content: name: spring_profiles_active - value: oc, dev \ No newline at end of file + value: oc, dev diff --git a/src/test/helm/deployment_test.yaml b/src/test/helm/deployment_test.yaml index 7168d78dd2471583010650f08e3900c8d7aea49a..d61ea6522f04aeecd33fefd18bf33244990c761c 100644 --- a/src/test/helm/deployment_test.yaml +++ b/src/test/helm/deployment_test.yaml @@ -31,6 +31,11 @@ set: ozgcloud.environment: "default" tests: - it: should have metadata values + set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm asserts: - isKind: of: Deployment @@ -43,6 +48,11 @@ tests: - exists: path: metadata.labels - it: should have correct general settings + set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm asserts: - equal: path: spec.progressDeadlineSeconds @@ -71,6 +81,11 @@ tests: path: spec.strategy.type value: "RollingUpdate" - it: should have correct template configuration + set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm asserts: - equal: path: spec.template.metadata.labels["app.kubernetes.io/instance"] @@ -110,6 +125,11 @@ tests: path: spec.template.spec.terminationGracePeriodSeconds value: 300000000 - it: should have correct container configuration + set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm asserts: - equal: path: spec.template.spec.containers[0].name