From 96394f1b9f3b1de15af03a7218075d51ab2973ea Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Tue, 18 Jun 2024 14:18:05 +0200 Subject: [PATCH] OZG-5653 add unittests for netpol zufi rules --- src/test/helm/network_policy_test.yaml | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/test/helm/network_policy_test.yaml b/src/test/helm/network_policy_test.yaml index 6348f8be5..e601e5f02 100644 --- a/src/test/helm/network_policy_test.yaml +++ b/src/test/helm/network_policy_test.yaml @@ -262,6 +262,41 @@ tests: matchLabels: component: info-manager + - it: should add egress rule to zufi server if zufi is enabled + set: + ozgcloud: + zufi: + enabled: true + namespace: zufi + asserts: + - contains: + path: spec.egress + content: + to: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: zufi + podSelector: + matchLabels: + component: zufi-server + + - it: should not add egress rule to zufi server if zufi is disabled + set: + ozgcloud: + zufi: + enabled: false + asserts: + - notContains: + path: spec.egress + content: + to: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: zufi + podSelector: + matchLabels: + component: zufi-server + - it: should add egress rule to dns service asserts: -- GitLab