Skip to content
Snippets Groups Projects
Verified Commit 19dd0e03 authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

ci(charts): Switch to new helm-unittest upstream

The helm-unittest upstream has switched back to the helm-unittest
organisation again. Therefore switching to a different image. With the
switch a few minor, but breaking changes have been introduced.

- Dropping helm v2 support
- adjustment of indentation
- enforcing jsonpath for selection

Reference:
https://github.com/helm-unittest/helm-unittest
parent 3af3fc7b
No related branches found
No related tags found
1 merge request!628ci(charts): Switch to new helm-unittest upstream
Showing
with 939 additions and 942 deletions
...@@ -38,11 +38,11 @@ chart-helm-unittest: ...@@ -38,11 +38,11 @@ chart-helm-unittest:
stage: lint stage: lint
extends: .chart-matrix extends: .chart-matrix
image: image:
name: docker.io/quintush/helm-unittest:3.10.1-0.2.9 name: docker.io/helmunittest/helm-unittest:3.11.2-0.3.1
entrypoint: [""] entrypoint: [""]
script: script:
- if [ ! -e charts/${CHART}/tests ]; then echo "No helm unittests"; exit 0; fi - if [ ! -e charts/${CHART}/tests ]; then echo "No helm unittests"; exit 0; fi
- helm unittest -3 -o helm-unittest-${CHART}.xml -t junit charts/${CHART} - helm unittest -o helm-unittest-${CHART}.xml -t junit charts/${CHART}
artifacts: artifacts:
when: always when: always
reports: reports:
......
...@@ -26,11 +26,11 @@ tests: ...@@ -26,11 +26,11 @@ tests:
version: 1.2.3 version: 1.2.3
asserts: asserts:
- equal: - equal:
path: metadata.labels.[app.kubernetes.io/instance] path: metadata.labels["app.kubernetes.io/instance"]
value: "test-suite" value: "test-suite"
- equal: - equal:
path: metadata.labels.[app.kubernetes.io/managed-by] path: metadata.labels["app.kubernetes.io/managed-by"]
value: "Helm" value: "Helm"
- equal: - equal:
path: metadata.labels.[app.kubernetes.io/name] path: metadata.labels["app.kubernetes.io/name"]
value: "keycloak" value: "keycloak"
...@@ -65,17 +65,17 @@ tests: ...@@ -65,17 +65,17 @@ tests:
- mocks/sidekiq.yaml - mocks/sidekiq.yaml
asserts: asserts:
- equal: - equal:
path: spec.selector.matchLabels.app\.kubernetes\.io/component path: spec.selector.matchLabels["app.kubernetes.io/component"]
value: sidekiq-scheduler value: sidekiq-scheduler
documentIndex: 0 documentIndex: 0
template: deployment-sidekiq.yaml template: deployment-sidekiq.yaml
- equal: - equal:
path: spec.selector.matchLabels.app\.kubernetes\.io/component path: spec.selector.matchLabels["app.kubernetes.io/component"]
value: sidekiq-default value: sidekiq-default
documentIndex: 1 documentIndex: 1
template: deployment-sidekiq.yaml template: deployment-sidekiq.yaml
- equal: - equal:
path: spec.selector.matchLabels.app\.kubernetes\.io/part-of path: spec.selector.matchLabels["app.kubernetes.io/part-of"]
value: rails value: rails
template: deployment-sidekiq.yaml template: deployment-sidekiq.yaml
...@@ -31,11 +31,11 @@ tests: ...@@ -31,11 +31,11 @@ tests:
version: 1.2.3 version: 1.2.3
asserts: asserts:
- equal: - equal:
path: metadata.labels.[app.kubernetes.io/instance] path: metadata.labels["app.kubernetes.io/instance"]
value: "test-suite" value: "test-suite"
- equal: - equal:
path: metadata.labels.[app.kubernetes.io/managed-by] path: metadata.labels["app.kubernetes.io/managed-by"]
value: "Helm" value: "Helm"
- equal: - equal:
path: metadata.labels.[app.kubernetes.io/name] path: metadata.labels["app.kubernetes.io/name"]
value: "mastodon" value: "mastodon"
...@@ -72,8 +72,7 @@ should match snapshot: ...@@ -72,8 +72,7 @@ should match snapshot:
command: command:
- sh - sh
- -c - -c
- ps axf | fgrep -v grep | fgrep -q "supervisord" && ps axf | fgrep -v - ps axf | fgrep -v grep | fgrep -q "supervisord" && ps axf | fgrep -v grep | fgrep -q "/usr/libexec/postfix/master"
grep | fgrep -q "/usr/libexec/postfix/master"
failureThreshold: 1 failureThreshold: 1
initialDelaySeconds: 5 initialDelaySeconds: 5
periodSeconds: 5 periodSeconds: 5
...@@ -90,8 +89,7 @@ should match snapshot: ...@@ -90,8 +89,7 @@ should match snapshot:
command: command:
- sh - sh
- -c - -c
- printf "EHLO healthcheck\n" | nc 127.0.0.1 587 | grep -qE "^220.*ESMTP - printf "EHLO healthcheck\n" | nc 127.0.0.1 587 | grep -qE "^220.*ESMTP Postfix"
Postfix"
initialDelaySeconds: 5 initialDelaySeconds: 5
periodSeconds: 60 periodSeconds: 60
timeoutSeconds: 5 timeoutSeconds: 5
...@@ -121,8 +119,7 @@ should match snapshot: ...@@ -121,8 +119,7 @@ should match snapshot:
command: command:
- sh - sh
- -c - -c
- ps axf | fgrep -v grep | fgrep -q "supervisord" && ps axf | fgrep -v - ps axf | fgrep -v grep | fgrep -q "supervisord" && ps axf | fgrep -v grep | fgrep -q "/usr/libexec/postfix/master"
grep | fgrep -q "/usr/libexec/postfix/master"
failureThreshold: 12 failureThreshold: 12
initialDelaySeconds: 2 initialDelaySeconds: 2
periodSeconds: 5 periodSeconds: 5
......
...@@ -96,7 +96,7 @@ tests: ...@@ -96,7 +96,7 @@ tests:
secretName: example-tls secretName: example-tls
asserts: asserts:
- equal: - equal:
path: spec.template.metadata.annotations.[checksum/config] path: spec.template.metadata.annotations["checksum/config"]
value: 66ea930a9b7e50528ddc0aa54786d07f78c7f56d1daea45b21d9eb94f8e5c4f2 value: 66ea930a9b7e50528ddc0aa54786d07f78c7f56d1daea45b21d9eb94f8e5c4f2
documentIndex: 2 documentIndex: 2
template: dovecot.yaml template: dovecot.yaml
...@@ -113,7 +113,7 @@ tests: ...@@ -113,7 +113,7 @@ tests:
passwordHash: NotReallyAHash passwordHash: NotReallyAHash
asserts: asserts:
- equal: - equal:
path: spec.template.metadata.annotations.[checksum/config] path: spec.template.metadata.annotations["checksum/config"]
value: 9215abccdd6c1f21fd329db0133f6f8e892c50aab3dcde3259ea797e8ad2a959 value: 9215abccdd6c1f21fd329db0133f6f8e892c50aab3dcde3259ea797e8ad2a959
documentIndex: 2 documentIndex: 2
template: dovecot.yaml template: dovecot.yaml
......
...@@ -21,11 +21,11 @@ tests: ...@@ -21,11 +21,11 @@ tests:
version: 1.2.3 version: 1.2.3
asserts: asserts:
- equal: - equal:
path: metadata.labels.[app.kubernetes.io/instance] path: metadata.labels["app.kubernetes.io/instance"]
value: "test-suite" value: "test-suite"
- equal: - equal:
path: metadata.labels.[app.kubernetes.io/managed-by] path: metadata.labels["app.kubernetes.io/managed-by"]
value: "Helm" value: "Helm"
- equal: - equal:
path: metadata.labels.[app.kubernetes.io/name] path: metadata.labels["app.kubernetes.io/name"]
value: "mok" value: "mok"
...@@ -65,7 +65,7 @@ tests: ...@@ -65,7 +65,7 @@ tests:
value: 0.0.0.0/0 value: 0.0.0.0/0
documentIndex: 0 documentIndex: 0
template: networkpolicy.yaml template: networkpolicy.yaml
- isEmpty: - isNull:
path: spec.ingress[1].from[0].ipBlock.except path: spec.ingress[1].from[0].ipBlock.except
documentIndex: 0 documentIndex: 0
template: networkpolicy.yaml template: networkpolicy.yaml
...@@ -100,7 +100,7 @@ tests: ...@@ -100,7 +100,7 @@ tests:
value: 0.0.0.0/0 value: 0.0.0.0/0
documentIndex: 0 documentIndex: 0
template: networkpolicy.yaml template: networkpolicy.yaml
- isEmpty: - isNull:
path: spec.ingress[1].from[0].ipBlock.except path: spec.ingress[1].from[0].ipBlock.except
documentIndex: 0 documentIndex: 0
template: networkpolicy.yaml template: networkpolicy.yaml
...@@ -135,7 +135,7 @@ tests: ...@@ -135,7 +135,7 @@ tests:
value: 0.0.0.0/0 value: 0.0.0.0/0
documentIndex: 0 documentIndex: 0
template: networkpolicy.yaml template: networkpolicy.yaml
- isEmpty: - isNull:
path: spec.ingress[1].from[0].ipBlock.except path: spec.ingress[1].from[0].ipBlock.except
documentIndex: 0 documentIndex: 0
template: networkpolicy.yaml template: networkpolicy.yaml
...@@ -164,7 +164,7 @@ tests: ...@@ -164,7 +164,7 @@ tests:
value: 0.0.0.0/0 value: 0.0.0.0/0
documentIndex: 1 documentIndex: 1
template: networkpolicy.yaml template: networkpolicy.yaml
- isEmpty: - isNull:
path: spec.ingress[0].from[0].ipBlock.except path: spec.ingress[0].from[0].ipBlock.except
documentIndex: 1 documentIndex: 1
template: networkpolicy.yaml template: networkpolicy.yaml
...@@ -192,7 +192,7 @@ tests: ...@@ -192,7 +192,7 @@ tests:
value: 0.0.0.0/0 value: 0.0.0.0/0
documentIndex: 1 documentIndex: 1
template: networkpolicy.yaml template: networkpolicy.yaml
- isEmpty: - isNull:
path: spec.ingress[0].from[0].ipBlock.except path: spec.ingress[0].from[0].ipBlock.except
documentIndex: 1 documentIndex: 1
template: networkpolicy.yaml template: networkpolicy.yaml
...@@ -232,7 +232,7 @@ tests: ...@@ -232,7 +232,7 @@ tests:
value: 127.0.123.123/32 value: 127.0.123.123/32
documentIndex: 1 documentIndex: 1
template: networkpolicy.yaml template: networkpolicy.yaml
- isEmpty: - isNull:
path: spec.ingress[1].from[0].ipBlock.except path: spec.ingress[1].from[0].ipBlock.except
documentIndex: 1 documentIndex: 1
template: networkpolicy.yaml template: networkpolicy.yaml
......
...@@ -82,7 +82,7 @@ tests: ...@@ -82,7 +82,7 @@ tests:
secretName: example-tls secretName: example-tls
asserts: asserts:
- equal: - equal:
path: spec.template.metadata.annotations.[checksum/config] path: spec.template.metadata.annotations["checksum/config"]
value: 66ea930a9b7e50528ddc0aa54786d07f78c7f56d1daea45b21d9eb94f8e5c4f2 value: 66ea930a9b7e50528ddc0aa54786d07f78c7f56d1daea45b21d9eb94f8e5c4f2
documentIndex: 1 documentIndex: 1
template: postfix.yaml template: postfix.yaml
...@@ -99,7 +99,7 @@ tests: ...@@ -99,7 +99,7 @@ tests:
passwordHash: NotReallyAHash passwordHash: NotReallyAHash
asserts: asserts:
- equal: - equal:
path: spec.template.metadata.annotations.[checksum/config] path: spec.template.metadata.annotations["checksum/config"]
value: 9215abccdd6c1f21fd329db0133f6f8e892c50aab3dcde3259ea797e8ad2a959 value: 9215abccdd6c1f21fd329db0133f6f8e892c50aab3dcde3259ea797e8ad2a959
documentIndex: 1 documentIndex: 1
template: postfix.yaml template: postfix.yaml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment