diff --git a/src/test/helm/deployment_database_test.yaml b/src/test/helm/deployment_database_test.yaml index a6a35d7ab0a8c8b49b2d07829a3d783923f70b31..5fc29c4b3a9aae780b44f2ad816c08f98a49489c 100644 --- a/src/test/helm/deployment_database_test.yaml +++ b/src/test/helm/deployment_database_test.yaml @@ -35,8 +35,8 @@ tests: environment: test bundesland: sh bezeichner: helm - sso: - serverUrl: https://sso.company.local + sso: + serverUrl: https://sso.company.local asserts: - contains: path: spec.template.spec.volumes @@ -51,8 +51,8 @@ tests: environment: test bundesland: sh bezeichner: helm - sso: - serverUrl: https://sso.company.local + sso: + serverUrl: https://sso.company.local asserts: - contains: path: spec.template.spec.containers[0].volumeMounts @@ -67,8 +67,8 @@ tests: environment: test bundesland: sh bezeichner: helm - sso: - serverUrl: https://sso.company.local + sso: + serverUrl: https://sso.company.local database.useExternal: false asserts: - contains: @@ -91,8 +91,8 @@ tests: environment: test bundesland: sh bezeichner: helm - sso: - serverUrl: https://sso.company.local + sso: + serverUrl: https://sso.company.local database.useExternal: true asserts: - contains: diff --git a/src/test/helm/deployment_image_pull_secret_test.yaml b/src/test/helm/deployment_image_pull_secret_test.yaml index d1df4f752670af21a9295f667247e17ab8aff146..eae6b2dc8e9219ac6b4898547abbf7841d5831bb 100644 --- a/src/test/helm/deployment_image_pull_secret_test.yaml +++ b/src/test/helm/deployment_image_pull_secret_test.yaml @@ -34,8 +34,8 @@ tests: environment: test bundesland: sh bezeichner: helm - sso: - serverUrl: https://sso.company.local + sso: + serverUrl: https://sso.company.local asserts: - contains: path: spec.template.spec.imagePullSecrets @@ -47,8 +47,8 @@ tests: environment: test bundesland: sh bezeichner: helm - sso: - serverUrl: https://sso.company.local + sso: + serverUrl: https://sso.company.local imagePullSecret: custom-image-pull-secret asserts: - contains: diff --git a/src/test/helm/deployment_resources_test.yaml b/src/test/helm/deployment_resources_test.yaml index 9514097aadb96806f973d5cccbace208b80d6ff0..753db426fd74b58e88141ce8dba48cee80aa7767 100644 --- a/src/test/helm/deployment_resources_test.yaml +++ b/src/test/helm/deployment_resources_test.yaml @@ -34,8 +34,8 @@ tests: environment: test bundesland: sh bezeichner: helm - sso: - serverUrl: https://sso.company.local + sso: + serverUrl: https://sso.company.local resources: { "test": 1 } asserts: - equal: diff --git a/src/test/helm/deployment_spring_profile_test.yaml b/src/test/helm/deployment_spring_profile_test.yaml index 5455300842b48562c1ee257d631aa356694dbe23..d01bfc20b32a42ee7fae0c3481599560121b5248 100644 --- a/src/test/helm/deployment_spring_profile_test.yaml +++ b/src/test/helm/deployment_spring_profile_test.yaml @@ -35,8 +35,8 @@ tests: environment: test bundesland: sh bezeichner: helm - sso: - serverUrl: https://sso.company.local + sso: + serverUrl: https://sso.company.local env.overrideSpringProfiles: oc,dev,ea asserts: - isKind: @@ -52,8 +52,8 @@ tests: environment: test bundesland: sh bezeichner: helm - sso: - serverUrl: https://sso.company.local + sso: + serverUrl: https://sso.company.local asserts: - isKind: of: Deployment diff --git a/src/test/helm/deployment_test.yaml b/src/test/helm/deployment_test.yaml index fda481560f15326b7c4e276e437686d6d57abbcc..d181f0e855a80dfad05a5e288b91fc4ca0824d61 100644 --- a/src/test/helm/deployment_test.yaml +++ b/src/test/helm/deployment_test.yaml @@ -24,211 +24,211 @@ suite: deployment release: - name: administration + name: administration templates: - - templates/deployment.yaml + - templates/deployment.yaml set: - ozgcloud.environment: "default" + ozgcloud.environment: "default" tests: - - it: should have metadata values - set: - ozgcloud: - environment: test - bundesland: sh - bezeichner: helm - sso: - serverUrl: https://sso.company.local - asserts: - - isKind: - of: Deployment - - equal: - path: metadata.name - value: "administration" - - equal: - path: metadata.namespace - value: "NAMESPACE" - - exists: - path: metadata.labels - - it: should have correct general settings - set: - ozgcloud: - environment: test - bundesland: sh - bezeichner: helm - sso: - serverUrl: https://sso.company.local - asserts: - - equal: - path: spec.progressDeadlineSeconds - value: 600 - - equal: - path: spec.replicas - value: 1 - - equal: - path: spec.revisionHistoryLimit - value: 10 - - exists: - path: spec.selector - - equal: - path: spec.selector.matchLabels["app.kubernetes.io/name"] - value: "administration" - - equal: - path: spec.selector.matchLabels["app.kubernetes.io/namespace"] - value: "NAMESPACE" - - equal: - path: spec.strategy.rollingUpdate.maxSurge - value: 1 - - equal: - path: spec.strategy.rollingUpdate.maxUnavailable - value: 0 - - equal: - path: spec.strategy.type - value: "RollingUpdate" - - it: should have correct template configuration - set: - ozgcloud: - environment: test - bundesland: sh - bezeichner: helm - sso: - serverUrl: https://sso.company.local - asserts: - - equal: - path: spec.template.metadata.labels["app.kubernetes.io/instance"] - value: "administration" - - equal: - path: spec.template.metadata.labels.component - value: "administration" - - equal: - path: spec.template.spec.topologySpreadConstraints[0].maxSkew - value: 1 - - equal: - path: spec.template.spec.topologySpreadConstraints[0].topologyKey - value: "kubernetes.io/hostname" - - equal: - path: spec.template.spec.topologySpreadConstraints[0].whenUnsatisfiable - value: "ScheduleAnyway" - - equal: - path: spec.template.spec.topologySpreadConstraints[0].labelSelector.matchLabels["app.kubernetes.io/name"] - value: "administration" - - isEmpty: - path: spec.template.spec.dnsConfig - - equal: - path: spec.template.spec.dnsPolicy - value: "ClusterFirst" - - equal: - path: spec.template.spec.imagePullSecrets[0].name - value: "administration-image-pull-secret" - - equal: - path: spec.template.spec.restartPolicy - value: "Always" - - equal: - path: spec.template.spec.schedulerName - value: "default-scheduler" - - isEmpty: - path: spec.template.spec.securityContext - - equal: - path: spec.template.spec.terminationGracePeriodSeconds - value: 300000000 - - it: should have correct container configuration - set: - ozgcloud: - environment: test - bundesland: sh - bezeichner: helm - sso: - serverUrl: https://sso.company.local - asserts: - - equal: - path: spec.template.spec.containers[0].name - value: "administration" - - equal: - path: spec.template.spec.containers[0].image - value: "docker.ozg-sh.de/administration:latest" - - equal: - path: spec.template.spec.containers[0].imagePullPolicy - value: "Always" - - equal: - path: spec.template.spec.containers[0].ports[0].containerPort - value: 8080 - - equal: - path: spec.template.spec.containers[0].ports[0].name - value: "8080tcp1" - - equal: - path: spec.template.spec.containers[0].ports[0].protocol - value: "TCP" - - equal: - path: spec.template.spec.containers[0].ports[1].containerPort - value: 8081 - - equal: - path: spec.template.spec.containers[0].ports[1].name - value: "metrics" - - equal: - path: spec.template.spec.containers[0].ports[1].protocol - value: "TCP" - - equal: - path: spec.template.spec.containers[0].readinessProbe.failureThreshold - value: 3 - - equal: - path: spec.template.spec.containers[0].readinessProbe.httpGet.path - value: "/actuator/health/readiness" - - equal: - path: spec.template.spec.containers[0].readinessProbe.httpGet.port - value: 8081 - - equal: - path: spec.template.spec.containers[0].readinessProbe.httpGet.scheme - value: "HTTP" - - equal: - path: spec.template.spec.containers[0].readinessProbe.periodSeconds - value: 10 - - equal: - path: spec.template.spec.containers[0].readinessProbe.successThreshold - value: 1 - - equal: - path: spec.template.spec.containers[0].readinessProbe.timeoutSeconds - value: 3 - - equal: - path: spec.template.spec.containers[0].startupProbe.httpGet.path - value: "/actuator/health/readiness" - - equal: - path: spec.template.spec.containers[0].startupProbe.httpGet.port - value: 8081 - - equal: - path: spec.template.spec.containers[0].startupProbe.failureThreshold - value: 10 - - equal: - path: spec.template.spec.containers[0].startupProbe.initialDelaySeconds - value: 30 - - equal: - path: spec.template.spec.containers[0].startupProbe.periodSeconds - value: 10 - - equal: - path: spec.template.spec.containers[0].startupProbe.successThreshold - value: 1 - - equal: - path: spec.template.spec.containers[0].startupProbe.timeoutSeconds - value: 5 - - equal: - path: spec.template.spec.containers[0].securityContext.allowPrivilegeEscalation - value: false - - equal: - path: spec.template.spec.containers[0].securityContext.privileged - value: false - - equal: - path: spec.template.spec.containers[0].securityContext.readOnlyRootFilesystem - value: false - - equal: - path: spec.template.spec.containers[0].securityContext.runAsNonRoot - value: true - - equal: - path: spec.template.spec.containers[0].stdin - value: true - - equal: - path: spec.template.spec.containers[0].terminationMessagePath - value: "/dev/termination-log" - - equal: - path: spec.template.spec.containers[0].terminationMessagePolicy - value: "File" - - equal: - path: spec.template.spec.containers[0].tty - value: true + - it: should have metadata values + set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm + sso: + serverUrl: https://sso.company.local + asserts: + - isKind: + of: Deployment + - equal: + path: metadata.name + value: "administration" + - equal: + path: metadata.namespace + value: "NAMESPACE" + - exists: + path: metadata.labels + - it: should have correct general settings + set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm + sso: + serverUrl: https://sso.company.local + asserts: + - equal: + path: spec.progressDeadlineSeconds + value: 600 + - equal: + path: spec.replicas + value: 1 + - equal: + path: spec.revisionHistoryLimit + value: 10 + - exists: + path: spec.selector + - equal: + path: spec.selector.matchLabels["app.kubernetes.io/name"] + value: "administration" + - equal: + path: spec.selector.matchLabels["app.kubernetes.io/namespace"] + value: "NAMESPACE" + - equal: + path: spec.strategy.rollingUpdate.maxSurge + value: 1 + - equal: + path: spec.strategy.rollingUpdate.maxUnavailable + value: 0 + - equal: + path: spec.strategy.type + value: "RollingUpdate" + - it: should have correct template configuration + set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm + sso: + serverUrl: https://sso.company.local + asserts: + - equal: + path: spec.template.metadata.labels["app.kubernetes.io/instance"] + value: "administration" + - equal: + path: spec.template.metadata.labels.component + value: "administration" + - equal: + path: spec.template.spec.topologySpreadConstraints[0].maxSkew + value: 1 + - equal: + path: spec.template.spec.topologySpreadConstraints[0].topologyKey + value: "kubernetes.io/hostname" + - equal: + path: spec.template.spec.topologySpreadConstraints[0].whenUnsatisfiable + value: "ScheduleAnyway" + - equal: + path: spec.template.spec.topologySpreadConstraints[0].labelSelector.matchLabels["app.kubernetes.io/name"] + value: "administration" + - isEmpty: + path: spec.template.spec.dnsConfig + - equal: + path: spec.template.spec.dnsPolicy + value: "ClusterFirst" + - equal: + path: spec.template.spec.imagePullSecrets[0].name + value: "administration-image-pull-secret" + - equal: + path: spec.template.spec.restartPolicy + value: "Always" + - equal: + path: spec.template.spec.schedulerName + value: "default-scheduler" + - isEmpty: + path: spec.template.spec.securityContext + - equal: + path: spec.template.spec.terminationGracePeriodSeconds + value: 300000000 + - it: should have correct container configuration + set: + ozgcloud: + environment: test + bundesland: sh + bezeichner: helm + sso: + serverUrl: https://sso.company.local + asserts: + - equal: + path: spec.template.spec.containers[0].name + value: "administration" + - equal: + path: spec.template.spec.containers[0].image + value: "docker.ozg-sh.de/administration:latest" + - equal: + path: spec.template.spec.containers[0].imagePullPolicy + value: "Always" + - equal: + path: spec.template.spec.containers[0].ports[0].containerPort + value: 8080 + - equal: + path: spec.template.spec.containers[0].ports[0].name + value: "8080tcp1" + - equal: + path: spec.template.spec.containers[0].ports[0].protocol + value: "TCP" + - equal: + path: spec.template.spec.containers[0].ports[1].containerPort + value: 8081 + - equal: + path: spec.template.spec.containers[0].ports[1].name + value: "metrics" + - equal: + path: spec.template.spec.containers[0].ports[1].protocol + value: "TCP" + - equal: + path: spec.template.spec.containers[0].readinessProbe.failureThreshold + value: 3 + - equal: + path: spec.template.spec.containers[0].readinessProbe.httpGet.path + value: "/actuator/health/readiness" + - equal: + path: spec.template.spec.containers[0].readinessProbe.httpGet.port + value: 8081 + - equal: + path: spec.template.spec.containers[0].readinessProbe.httpGet.scheme + value: "HTTP" + - equal: + path: spec.template.spec.containers[0].readinessProbe.periodSeconds + value: 10 + - equal: + path: spec.template.spec.containers[0].readinessProbe.successThreshold + value: 1 + - equal: + path: spec.template.spec.containers[0].readinessProbe.timeoutSeconds + value: 3 + - equal: + path: spec.template.spec.containers[0].startupProbe.httpGet.path + value: "/actuator/health/readiness" + - equal: + path: spec.template.spec.containers[0].startupProbe.httpGet.port + value: 8081 + - equal: + path: spec.template.spec.containers[0].startupProbe.failureThreshold + value: 10 + - equal: + path: spec.template.spec.containers[0].startupProbe.initialDelaySeconds + value: 30 + - equal: + path: spec.template.spec.containers[0].startupProbe.periodSeconds + value: 10 + - equal: + path: spec.template.spec.containers[0].startupProbe.successThreshold + value: 1 + - equal: + path: spec.template.spec.containers[0].startupProbe.timeoutSeconds + value: 5 + - equal: + path: spec.template.spec.containers[0].securityContext.allowPrivilegeEscalation + value: false + - equal: + path: spec.template.spec.containers[0].securityContext.privileged + value: false + - equal: + path: spec.template.spec.containers[0].securityContext.readOnlyRootFilesystem + value: false + - equal: + path: spec.template.spec.containers[0].securityContext.runAsNonRoot + value: true + - equal: + path: spec.template.spec.containers[0].stdin + value: true + - equal: + path: spec.template.spec.containers[0].terminationMessagePath + value: "/dev/termination-log" + - equal: + path: spec.template.spec.containers[0].terminationMessagePolicy + value: "File" + - equal: + path: spec.template.spec.containers[0].tty + value: true