From ace152c2a01e9c363eac31e6f2aa6d97d79b8d3f Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Mon, 15 Jul 2024 17:44:28 +0200
Subject: [PATCH] OZG-6105 add netpol required values unittests

---
 src/test/helm/network_policy_test.yaml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/test/helm/network_policy_test.yaml b/src/test/helm/network_policy_test.yaml
index 1abf7b15e..ab74074fa 100644
--- a/src/test/helm/network_policy_test.yaml
+++ b/src/test/helm/network_policy_test.yaml
@@ -106,6 +106,21 @@ tests:
       networkPolicy:
         disabled: false
         dnsServerNamespace: test-dns-namespace
+    asserts:
+      - hasDocuments:
+          count: 1
+  - it: test network policy dnsServerNamespace must be set message
+    set:
+      networkPolicy:
+        disabled: false
+    asserts:
+      - failedTemplate:
+          errorMessage: networkPolicy.dnsServerNamespace must be set
+
+  - it: test network policy should be enabled by default
+    set:
+      networkPolicy:
+        dnsServerNamespace: test-dns-server-namespace
     asserts:
       - hasDocuments:
           count: 1
\ No newline at end of file
-- 
GitLab