Skip to content
Snippets Groups Projects
Commit bdb556a8 authored by OZG-Cloud Team's avatar OZG-Cloud Team
Browse files

Merge branch 'master' into knecht-root-recht

parent 525747d6
Branches
Tags
No related merge requests found
......@@ -135,7 +135,7 @@ pipeline {
HELM_CHART_VERSION = generateHelmChartVersion()
dir('src/main/helm') {
sh "helm lint -f test-values.yaml"
sh "helm lint -f ../../test/helm-linter-values.yaml"
sh "helm unittest --helm3 -f '../../test/helm/*.yaml' -v '../../test/unit-values.yaml' ."
......
......@@ -2,6 +2,6 @@
set -e
helm template ./src/main/helm/ -f src/test/unit-values.yaml
helm lint -f src/test/unit-values.yaml ./src/main/helm/
helm template ./src/main/helm/ -f src/test/helm-linter-values.yaml
helm lint -f src/test/helm-linter-values.yaml ./src/main/helm/
cd src/main/helm && helm unittest --helm3 -f '../../test/helm/*.yaml' -v '../../test/unit-values.yaml' .
\ No newline at end of file
......@@ -49,10 +49,7 @@ spec:
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
k8s-app: kube-dns
kubernetes.io/metadata.name: {{ required "networkPolicy.dnsServerNamespace must be set" (.Values.networkPolicy).dnsServerNamespace }}
ports:
- port: 53
protocol: UDP
......
......@@ -26,3 +26,6 @@ ozgcloud:
environment: test
bezeichner: helm
bundesland: sh
networkPolicy:
dnsServerNamespace: test-dns-server-namespace
\ No newline at end of file
......@@ -30,14 +30,23 @@ templates:
- templates/network_policy.yaml
tests:
- it: should match apiVersion
set:
networkPolicy:
dnsServerNamespace: test-dns-namespace
asserts:
- isAPIVersion:
of: networking.k8s.io/v1
- it: should match kind
set:
networkPolicy:
dnsServerNamespace: test-dns-namespace
asserts:
- isKind:
of: NetworkPolicy
- it: validate metadata
set:
networkPolicy:
dnsServerNamespace: test-dns-namespace
asserts:
- equal:
path: metadata
......@@ -45,6 +54,9 @@ tests:
name: network-policy-afm-adapter
namespace: by-helm-test
- it: validate spec
set:
networkPolicy:
dnsServerNamespace: test-dns-namespace
asserts:
- equal:
path: spec
......@@ -69,10 +81,7 @@ tests:
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
k8s-app: kube-dns
kubernetes.io/metadata.name: test-dns-namespace
ports:
- port: 53
protocol: UDP
......@@ -83,6 +92,7 @@ tests:
set:
networkPolicy:
disabled: true
dnsServerNamespace: test-dns-namespace
asserts:
- hasDocuments:
count: 0
......@@ -91,6 +101,7 @@ tests:
set:
networkPolicy:
disabled: false
dnsServerNamespace: test-dns-namespace
asserts:
- hasDocuments:
count: 1
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment