diff --git a/src/test/helm/api-password-secret_test.yaml b/src/test/helm/api-password-secret_test.yaml index c39e185fea3d6e244b07759e77123681deb0924a..b3bafd399cb997471aae55d4723a18ce853282e1 100644 --- a/src/test/helm/api-password-secret_test.yaml +++ b/src/test/helm/api-password-secret_test.yaml @@ -4,6 +4,11 @@ release: namespace: sh-test-test templates: - templates/api-password-secret.yaml +set: + ozgcloud: + keycloak: + api: + password: testPassword tests: - it: test api secret kind asserts: @@ -13,7 +18,7 @@ tests: asserts: - equal: path: stringData.password - value: geheim + value: testPassword - it: should use Keycloak User Operator set: sso: diff --git a/src/test/helm/deployment-keycloak-values-test.yaml b/src/test/helm/deployment-keycloak-values-test.yaml index a59be04d80e3f2e2d33aa04deb11039ca1d02a7d..975dcd3736e5c6f0496db91ad48823e34ed0a6a0 100644 --- a/src/test/helm/deployment-keycloak-values-test.yaml +++ b/src/test/helm/deployment-keycloak-values-test.yaml @@ -27,11 +27,16 @@ release: name: user-manager templates: - templates/deployment.yaml +set: + ozgcloud: + bundesland: by + bezeichner: helm + environment: dev + sso: + serverUrl: https://sso.test.by.ozg-cloud.local + baseUrl: test.company.local tests: - it: validate keycloak configuration values - template: deployment.yaml - release: - namespace: sh-helm-test asserts: - contains: path: spec.template.spec.containers[0].env @@ -51,17 +56,17 @@ tests: path: spec.template.spec.containers[0].env content: name: OZGCLOUD_KEYCLOAK_API_REALM - value: sh-helm-test + value: by-helm-dev - contains: path: spec.template.spec.containers[0].env content: name: QUARKUS_OIDC_AUTH_SERVER_URL - value: https://sso.test.sh.ozg-cloud.de/realms/sh-helm-test + value: https://sso.test.by.ozg-cloud.local/realms/by-helm-dev - contains: path: spec.template.spec.containers[0].env content: name: KEYCLOAK_URL - value: https://sso.test.sh.ozg-cloud.de + value: https://sso.test.by.ozg-cloud.local - contains: path: spec.template.spec.containers[0].env content: @@ -69,12 +74,10 @@ tests: value: alfa - it: should set keycloak client name - template: deployment.yaml - release: - namespace: sh-helm-test set: sso: client_name: alfa + serverUrl: https://sso.company.local asserts: - contains: path: spec.template.spec.containers[0].env @@ -83,9 +86,6 @@ tests: value: alfa - it: sso.serverurl with https - template: deployment.yaml - release: - namespace: sh-helm-test set: sso.serverUrl: https://sso.test.by.ozg-cloud.de asserts: @@ -93,16 +93,13 @@ tests: path: spec.template.spec.containers[0].env content: name: QUARKUS_OIDC_AUTH_SERVER_URL - value: https://sso.test.by.ozg-cloud.de/realms/sh-helm-test + value: https://sso.test.by.ozg-cloud.de/realms/by-helm-dev - contains: path: spec.template.spec.containers[0].env content: name: KEYCLOAK_URL value: https://sso.test.by.ozg-cloud.de - it: sso.serverurl without https - template: deployment.yaml - release: - namespace: sh-helm-test set: sso.serverUrl: sso.test.by.ozg-cloud.de asserts: @@ -110,20 +107,19 @@ tests: path: spec.template.spec.containers[0].env content: name: QUARKUS_OIDC_AUTH_SERVER_URL - value: https://sso.test.by.ozg-cloud.de/realms/sh-helm-test + value: https://sso.test.by.ozg-cloud.de/realms/by-helm-dev - contains: path: spec.template.spec.containers[0].env content: name: KEYCLOAK_URL value: https://sso.test.by.ozg-cloud.de + - it: should use Keycloak User Operator - template: deployment.yaml - release: - namespace: sh-helm-test set: sso: api_user: name: -userManager-ApiUser + serverUrl: https://sso.company.local asserts: - contains: path: spec.template.spec.containers[0].env diff --git a/src/test/helm/deployment-mongodb-passwort-secretref-test.yaml b/src/test/helm/deployment-mongodb-passwort-secretref-test.yaml index c5009855f942d7e753d2a2a1eaf90927fdf7abb9..e3d55eea8a2b8cda7e866c5e08c726d1f40e3ba1 100644 --- a/src/test/helm/deployment-mongodb-passwort-secretref-test.yaml +++ b/src/test/helm/deployment-mongodb-passwort-secretref-test.yaml @@ -27,6 +27,13 @@ release: name: user-manager templates: - templates/deployment.yaml +set: + ozgcloud: + bundesland: by + bezeichner: helm + environment: dev + sso.serverUrl: https://sso.company.local + baseUrl: test.company.local tests: - it: should reference mongodb connectionString for user-manager set: diff --git a/src/test/helm/deployment-test.yaml b/src/test/helm/deployment-test.yaml index 63803158b25a70874c05dc979023cafbbfacc7ab..cfcbe842304507114096fef2d6868b916a3b21b2 100644 --- a/src/test/helm/deployment-test.yaml +++ b/src/test/helm/deployment-test.yaml @@ -27,6 +27,13 @@ release: name: user-manager templates: - templates/deployment.yaml +set: + ozgcloud: + bundesland: by + bezeichner: helm + environment: dev + sso.serverUrl: https://sso.company.local + baseUrl: test.company.local tests: - it: test resources for prod environment release: diff --git a/src/test/helm/deployment-url-value-test.yaml b/src/test/helm/deployment-url-value-test.yaml index 02fd1681afeb288eef0c0169f741080c2f8267ac..f5b2b82fd3f3e3e9a9ce459d304b3742ede6aba0 100644 --- a/src/test/helm/deployment-url-value-test.yaml +++ b/src/test/helm/deployment-url-value-test.yaml @@ -27,6 +27,13 @@ release: name: user-manager templates: - templates/deployment.yaml +set: + ozgcloud: + bundesland: by + bezeichner: helm + environment: dev + sso.serverUrl: https://sso.company.local + baseUrl: test.company.local tests: - it: validate keycloak configuration values template: deployment.yaml @@ -37,4 +44,4 @@ tests: path: spec.template.spec.containers[0].env content: name: OZGCLOUD_USER_MANAGER_URL - value: https://helm-user-manager.test.sh.ozg-cloud.de \ No newline at end of file + value: https://helm-user-manager.test.company.local \ No newline at end of file diff --git a/src/test/helm/deployment_container_security_context_test.yaml b/src/test/helm/deployment_container_security_context_test.yaml index d95c4d151a7fc52e2f94edbc6740571fb9460c8c..92090bb6e2310c9a31906c1e808d199a35198ea0 100644 --- a/src/test/helm/deployment_container_security_context_test.yaml +++ b/src/test/helm/deployment_container_security_context_test.yaml @@ -28,6 +28,13 @@ release: namespace: sh-helm-test templates: - templates/deployment.yaml +set: + ozgcloud: + bundesland: by + bezeichner: helm + environment: dev + sso.serverUrl: https://sso.company.local + baseUrl: test.company.local tests: - it: check default values asserts: diff --git a/src/test/helm/deployment_defaults_labels_test.yaml b/src/test/helm/deployment_defaults_labels_test.yaml index 5510fba2e300e7480fcbcf73798da3c1cb4c71dd..4edca498e0124092080565e5a1c35b4eacc9932c 100644 --- a/src/test/helm/deployment_defaults_labels_test.yaml +++ b/src/test/helm/deployment_defaults_labels_test.yaml @@ -30,39 +30,47 @@ templates: - templates/deployment.yaml - templates/service.yaml - templates/service_monitor.yaml +set: + ozgcloud: + bundesland: by + bezeichner: helm + environment: dev + sso: + serverUrl: https://sso.company.local + baseUrl: test.sh.ozg-cloud.local tests: - it: check default labels asserts: - equal: - path: metadata.labels.[app.kubernetes.io/instance] + path: metadata.labels["app.kubernetes.io/instance"] value: user-manager - equal: - path: metadata.labels.[app.kubernetes.io/name] + path: metadata.labels["app.kubernetes.io/name"] value: user-manager - equal: - path: metadata.labels.[app.kubernetes.io/part-of] + path: metadata.labels["app.kubernetes.io/part-of"] value: ozgcloud - equal: - path: metadata.labels.[app.kubernetes.io/namespace] + path: metadata.labels["app.kubernetes.io/namespace"] value: sh-helm-test - it: check component label for deployment templates: - templates/deployment.yaml asserts: - equal: - path: spec.template.metadata.labels.[component] + path: spec.template.metadata.labels["component"] value: user-manager - it: check component label for service templates: - templates/service.yaml asserts: - equal: - path: metadata.labels.[component] + path: metadata.labels["component"] value: user-manager-service - it: check component label for service monitor templates: - templates/service_monitor.yaml asserts: - equal: - path: metadata.labels.[component] + path: metadata.labels["component"] value: user-manager-service-monitor diff --git a/src/test/helm/deployment_env_test.yaml b/src/test/helm/deployment_env_test.yaml index 6f9e04b4f96f8bee161d1629c002e5bf2373a937..e2ede3f3e19c0b92f205522bacf6c2243717e082 100644 --- a/src/test/helm/deployment_env_test.yaml +++ b/src/test/helm/deployment_env_test.yaml @@ -80,6 +80,9 @@ tests: - it: check user sync period set set: ozgcloud: + bundesland: by + bezeichner: helm + environment: dev usersync: period: "6h" asserts: diff --git a/src/test/helm/network_policy_test.yaml b/src/test/helm/network_policy_test.yaml index 28458788e7b54d1b69190d6aec99df846f3b34b9..c67feb725f280c05312dc99f80a42d29c21ab28d 100644 --- a/src/test/helm/network_policy_test.yaml +++ b/src/test/helm/network_policy_test.yaml @@ -85,6 +85,8 @@ tests: - it: add ingress rule by values set: networkPolicy: + ssoPublicIp: 51.89.117.53/32 + dnsServerNamespace: test-namespace-dns additionalIngressConfig: - podSelector: matchLabels: @@ -112,6 +114,8 @@ tests: set: networkPolicy: disabled: false + ssoPublicIp: 51.89.117.53/32 + dnsServerNamespace: test-namespace-dns asserts: - hasDocuments: count: 1 \ No newline at end of file