diff --git a/nachrichten-bayernid-proxy/src/test/helm/network_policy_test.yaml b/nachrichten-bayernid-proxy/src/test/helm/network_policy_test.yaml index fbb9de636d7a0242b7ea2ce25f299d134416118e..6942329e62a7ca2a0544cc56d6f3d6d76e9b2120 100644 --- a/nachrichten-bayernid-proxy/src/test/helm/network_policy_test.yaml +++ b/nachrichten-bayernid-proxy/src/test/helm/network_policy_test.yaml @@ -91,16 +91,15 @@ tests: - port: 5353 protocol: TCP - - it: add ingress rule by values + - it: should add additionalIngressConfig set: networkPolicy: - ssoPublicIp: 51.89.117.53/32 - dnsServerNamespace: test-namespace-dns + dnsServerNamespace: test-dns-namespace additionalIngressConfig: - from: - podSelector: matchLabels: - component: client2 + additionalIngressConfig: yes asserts: - contains: path: spec.ingress @@ -108,49 +107,31 @@ tests: from: - podSelector: matchLabels: - component: client2 - + additionalIngressConfig: yes - - it: add egress rules by values + - it: should add additionalEgressConfig set: - networkPolicy: + networkPolicy: + dnsServerNamespace: test-dns-namespace additionalEgressConfig: - - to: - - ipBlock: - cidr: 1.2.3.4/32 - to: - podSelector: matchLabels: - component: ozg-testservice - ports: - - port: 12345 - protocol: TCP - - dnsServerNamespace: test-dns-namespace + additionalEgressConfig: yes asserts: - - contains: - path: spec.egress - content: - to: - - ipBlock: - cidr: 1.2.3.4/32 - contains: path: spec.egress content: to: - podSelector: matchLabels: - component: ozg-testservice - ports: - - port: 12345 - protocol: TCP + additionalEgressConfig: yes - it: should add additionalIngressConfigNamespace set: networkPolicy: - ssoPublicIp: 51.89.117.53/32 - dnsServerNamespace: test-namespace-dns + dnsServerNamespace: test-dns-namespace additionalIngressConfigNamespace: - from: - podSelector: diff --git a/src/test/helm/network_policy_test.yaml b/src/test/helm/network_policy_test.yaml index e31527a6ade27749981059e2ceb64ff890bb1ef1..ac7df6574a59eae14b64a88872f8f37a182dfa89 100644 --- a/src/test/helm/network_policy_test.yaml +++ b/src/test/helm/network_policy_test.yaml @@ -253,45 +253,46 @@ tests: matchLabels: component: client2 - - it: add egress rules by values + - it: should add additionalIngressConfig set: networkPolicy: + dnsServerNamespace: test-namespace-dns + additionalIngressConfig: + - from: + - podSelector: + matchLabels: + additionalIngressConfig: yes + asserts: + - contains: + path: spec.ingress + content: + from: + - podSelector: + matchLabels: + additionalIngressConfig: yes + + - it: should add additionalEgressConfig + set: + networkPolicy: + dnsServerNamespace: test-namespace-dns additionalEgressConfig: - - to: - - ipBlock: - cidr: 1.2.3.4/32 - to: - podSelector: matchLabels: - component: ozg-testservice - ports: - - port: 12345 - protocol: TCP - - dnsServerNamespace: test-dns-namespace + additionalEgressConfig: yes asserts: - - contains: - path: spec.egress - content: - to: - - ipBlock: - cidr: 1.2.3.4/32 - contains: path: spec.egress content: to: - podSelector: matchLabels: - component: ozg-testservice - ports: - - port: 12345 - protocol: TCP + additionalEgressConfig: yes - it: should add additionalIngressConfigNamespace set: networkPolicy: - ssoPublicIp: 51.89.117.53/32 dnsServerNamespace: test-namespace-dns additionalIngressConfigNamespace: - from: