From 783c74ecbc736bc29c5a55885f3b2b18edf5a08f Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Mon, 9 Dec 2024 15:58:03 +0100
Subject: [PATCH] Extend helm test for features

---
 src/test/helm/deployment_features_test.yaml | 33 +++++++++++++++++----
 1 file changed, 28 insertions(+), 5 deletions(-)

diff --git a/src/test/helm/deployment_features_test.yaml b/src/test/helm/deployment_features_test.yaml
index b0f29d2d..9e02c58d 100644
--- a/src/test/helm/deployment_features_test.yaml
+++ b/src/test/helm/deployment_features_test.yaml
@@ -53,13 +53,13 @@ tests:
           content:
             name: ozgcloud_feature_organisationsEinheiten
           any: true
-  - it: should set (optional) feature properties
+  - it: should set (optional) feature properties to true
     set:
       ozgcloud:
         feature:
-          postfach: true
-          benutzerRollen: true
-          organisationsEinheiten: true
+          postfach: "true"
+          benutzerRollen: "true"
+          organisationsEinheiten: "true"
     asserts:
       - contains:
           path: spec.template.spec.containers[0].env
@@ -75,4 +75,27 @@ tests:
           path: spec.template.spec.containers[0].env
           content:
             name: ozgcloud_feature_organisationsEinheiten
-            value: "true"
\ No newline at end of file
+            value: "true"
+  - it: should set (optional) feature properties to false
+    set:
+      ozgcloud:
+        feature:
+          postfach: "false"
+          benutzerRollen: "false"
+          organisationsEinheiten: "false"
+    asserts:
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: ozgcloud_feature_postfach
+            value: "false"
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: ozgcloud_feature_benutzerRollen
+            value: "false"
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: ozgcloud_feature_organisationsEinheiten
+            value: "false"
\ No newline at end of file
-- 
GitLab