Skip to content
Snippets Groups Projects
Commit 864d05e6 authored by Lukas Malte Monnerjahn's avatar Lukas Malte Monnerjahn
Browse files

OZG-4880 test osiv2 auth secret

parent b938a8ed
No related branches found
No related tags found
1 merge request!24OZG-4880 Helm Env Values für OSI-Postfach 2.0
......@@ -30,6 +30,6 @@ metadata:
namespace: {{ include "app.namespace" . }}
type: Opaque
stringData:
client-id: {{ .Values.ozgcloud.osiv2.auth.client_id }}
client-secret: {{ .Values.ozgcloud.osiv2.auth.client_secret }}
client-id: {{ .Values.ozgcloud.osiv2.auth.clientid }}
client-secret: {{ .Values.ozgcloud.osiv2.auth.clientsecret }}
{{- end }}
\ No newline at end of file
......@@ -63,12 +63,18 @@ tests:
path: spec.template.spec.containers[0].env
content:
name: ozgcloud_osiv2_auth_client-id
value: "client-id"
valueFrom:
secretKeyRef:
key: client-id
name: osiv2-auth
- contains:
path: spec.template.spec.containers[0].env
content:
name: ozgcloud_osiv2_auth_client-secret
value: "client-secret"
valueFrom:
secretKeyRef:
key: client-secret
name: osiv2-auth
- contains:
path: spec.template.spec.containers[0].env
content:
......@@ -108,8 +114,6 @@ tests:
enabled: "true"
host: "http://proxy.host"
port: "8080"
username: "username"
password: "password"
asserts:
- contains:
path: spec.template.spec.containers[0].env
......@@ -126,16 +130,6 @@ tests:
content:
name: ozgcloud_osiv2_http-proxy_port
value: 8080
- contains:
path: spec.template.spec.containers[0].env
content:
name: ozgcloud_osiv2_http-proxy_username
value: "username"
- contains:
path: spec.template.spec.containers[0].env
content:
name: ozgcloud_osiv2_http-proxy_password
value: "password"
- it: should not by default set osiv2 values
asserts:
- contains:
......
#
# Copyright (C) 2025 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 osiv2 auth secret
release:
name: vorgang-manager
namespace: sh-helm-test
templates:
- templates/osiv2_auth_secret.yaml
set:
ozgcloud:
osiv2:
auth:
clientid: "client-id"
clientsecret: "client-secret"
tests:
- it: test metadata
asserts:
- isKind:
of: Secret
- isAPIVersion:
of: v1
- equal:
path: metadata.name
value: osiv2-auth
- equal:
path: metadata.namespace
value: sh-helm-test
- it: test secret type
asserts:
- equal:
path: type
value: Opaque
- it: should have stringData
asserts:
- equal:
path: stringData.client-id
value: "client-id"
- equal:
path: stringData.client-secret
value: "client-secret"
- it: should not create osiv2 auth secret by default
set:
ozgcloud.osiv2.auth: null
asserts:
- hasDocuments:
count: 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment