diff --git a/Jenkinsfile b/Jenkinsfile index 3d70124a45c4b11b782c03e6f1c5b2379afaa063..999c2844a2de5bcb5ccbb48bb086bb4ed86158eb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -160,7 +160,7 @@ pipeline { HELM_CHART_VERSION = generateHelmChartVersion() dir('src/main/helm') { - sh "helm lint -f ../../test/unit-values.yaml" + sh "helm lint -f ../../test/linter-values.yaml" sh "helm unittest --helm3 -f '../../test/helm/*.yaml' -v '../../test/unit-values.yaml' ." diff --git a/src/test/helm/network_policy_test.yaml b/src/test/helm/network_policy_test.yaml index a2880b891e23db2283b9de4403cf0ab502180a6c..66da8d8ea8f18d64f89f3dd61dc0e562c4141b07 100644 --- a/src/test/helm/network_policy_test.yaml +++ b/src/test/helm/network_policy_test.yaml @@ -29,14 +29,23 @@ templates: - templates/network_policy.yaml tests: - it: should match apiVersion + set: + networkPolicy: + dnsServerNamespace: test-namespace-dns asserts: - isAPIVersion: of: networking.k8s.io/v1 - it: should match kind + set: + networkPolicy: + dnsServerNamespace: test-namespace-dns asserts: - isKind: of: NetworkPolicy - it: validate metadata + set: + networkPolicy: + dnsServerNamespace: test-namespace-dns asserts: - equal: path: metadata @@ -44,6 +53,9 @@ tests: name: network-policy-user-manager namespace: by-helm-test - it: validate spec + set: + networkPolicy: + dnsServerNamespace: test-namespace-dns asserts: - equal: path: spec @@ -81,6 +93,7 @@ tests: - it: add ingress rule by values set: networkPolicy: + dnsServerNamespace: test-namespace-dns additionalIngressConfig: - podSelector: matchLabels: @@ -99,6 +112,7 @@ tests: - it: test network policy disabled set: networkPolicy: + dnsServerNamespace: test-namespace-dns disabled: true asserts: - hasDocuments: @@ -107,6 +121,7 @@ tests: - it: test network policy unset should be disabled set: networkPolicy: + dnsServerNamespace: test-namespace-dns disabled: false asserts: - hasDocuments: diff --git a/src/test/unit-values.yaml b/src/test/unit-values.yaml index 41c86791c01941a737d421aaf768e43d0295deff..3beed7471843741873fa409ae049bf9c27009bbd 100644 --- a/src/test/unit-values.yaml +++ b/src/test/unit-values.yaml @@ -37,4 +37,3 @@ sso: networkPolicy: ssoPublicIp: 51.89.117.53/32 - dnsServerNamespace: test-namespace-dns \ No newline at end of file