From fa8f90aba42f3aa576f256965a759b98d82ab3bd Mon Sep 17 00:00:00 2001
From: Felix Reichenbach <felix.reichenbach@mgm-tp.com>
Date: Thu, 2 Jan 2025 17:00:55 +0100
Subject: [PATCH] OZG-7037 split up helm tests

---
 src/test/helm/xta_keystore_secret_test.yaml   | 47 ++++++++++++++++++-
 src/test/helm/xta_truststore_secret_test.yaml | 47 ++++++++++++++++++-
 2 files changed, 92 insertions(+), 2 deletions(-)

diff --git a/src/test/helm/xta_keystore_secret_test.yaml b/src/test/helm/xta_keystore_secret_test.yaml
index cc1e9b2a8..77c84e8f9 100644
--- a/src/test/helm/xta_keystore_secret_test.yaml
+++ b/src/test/helm/xta_keystore_secret_test.yaml
@@ -29,7 +29,7 @@ release:
   name: xta-adapter
   namespace: helm-test
 tests:
-  - it: should create keystore with values
+  - it: should create keystore secret
     set:
       ozgcloud:
         xta:
@@ -40,23 +40,68 @@ tests:
     asserts:
       - isKind:
           of: Secret
+  - it: should set api version
+    set:
+      ozgcloud:
+        xta:
+          keystore:
+            password: geheim
+            type: pkcs12
+            file: Z2VoZWltCg==
+    asserts:
       - isAPIVersion:
           of: v1
+  - it: should set value type
+    set:
+      ozgcloud:
+        xta:
+          keystore:
+            password: geheim
+            type: pkcs12
+            file: Z2VoZWltCg==
+    asserts:
       - equal:
           path: type
           value: Opaque
+  - it: should set metadate values
+    set:
+      ozgcloud:
+        xta:
+          keystore:
+            password: geheim
+            type: pkcs12
+            file: Z2VoZWltCg==
+    asserts:
       - equal:
           path: metadata.name
           value: xta-keystore
       - equal:
           path: metadata.namespace
           value: helm-test
+  - it: should set springData values
+    set:
+      ozgcloud:
+        xta:
+          keystore:
+            password: geheim
+            type: pkcs12
+            file: Z2VoZWltCg==
+    asserts:
       - equal:
           path: stringData.password
           value: geheim
       - equal:
           path: stringData.type
           value: pkcs12
+  - it: should set value for data.file
+    set:
+      ozgcloud:
+        xta:
+          keystore:
+            password: geheim
+            type: pkcs12
+            file: Z2VoZWltCg==
+    asserts:
       - equal:
           path: data.file
           value: Z2VoZWltCg==
diff --git a/src/test/helm/xta_truststore_secret_test.yaml b/src/test/helm/xta_truststore_secret_test.yaml
index ba28a2c46..76dba6cf7 100644
--- a/src/test/helm/xta_truststore_secret_test.yaml
+++ b/src/test/helm/xta_truststore_secret_test.yaml
@@ -29,7 +29,7 @@ release:
   name: xta-adapter
   namespace: helm-test
 tests:
-  - it: should create truststore with values
+  - it: should create truststore secret
     set:
       ozgcloud:
         xta:
@@ -40,23 +40,68 @@ tests:
     asserts:
       - isKind:
           of: Secret
+  - it: should set api version
+    set:
+      ozgcloud:
+        xta:
+          truststore:
+            password: geheim
+            type: JKS
+            file: Z2VoZWltCg==
+    asserts:
       - isAPIVersion:
           of: v1
+  - it: should set value for type
+    set:
+      ozgcloud:
+        xta:
+          truststore:
+            password: geheim
+            type: JKS
+            file: Z2VoZWltCg==
+    asserts:
       - equal:
           path: type
           value: Opaque
+  - it: should set values for metadata
+    set:
+      ozgcloud:
+        xta:
+          truststore:
+            password: geheim
+            type: JKS
+            file: Z2VoZWltCg==
+    asserts:
       - equal:
           path: metadata.name
           value: xta-truststore
       - equal:
           path: metadata.namespace
           value: helm-test
+  - it: should set stringData values
+    set:
+      ozgcloud:
+        xta:
+          truststore:
+            password: geheim
+            type: JKS
+            file: Z2VoZWltCg==
+    asserts:
       - equal:
           path: stringData.password
           value: geheim
       - equal:
           path: stringData.type
           value: JKS
+  - it: should set value data.file
+    set:
+      ozgcloud:
+        xta:
+          truststore:
+            password: geheim
+            type: JKS
+            file: Z2VoZWltCg==
+    asserts:
       - equal:
           path: data.file
           value: Z2VoZWltCg==
-- 
GitLab