From 1be9fae08b54742383e9f78fc3aa09a29b09a4fd Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Tue, 21 Mar 2023 23:53:13 +0800 Subject: [PATCH] test: use official unittest plugin (#410) ### Description of the change Switch to official `helm-unittest` which is now alive again at https://github.com/helm-unittest/helm-unittest ### Applicable issues - ref #199 ### Checklist - [ ] Parameters are documented in the `values.yaml` and added to the `README.md` using [readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm) - [ ] Breaking changes are documented in the `README.md` Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/410 Reviewed-by: justusbunsi Reviewed-by: pat-s Co-authored-by: Michael Kriese Co-committed-by: Michael Kriese --- .drone.yml | 2 +- CONTRIBUTING.md | 2 +- Makefile | 2 +- unittests/init/init_directory_structure.sh.yaml | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 40fc93e..98f3aa1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -28,7 +28,7 @@ steps: image: alpine:3.17 commands: - apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing make helm git bash - - helm plugin install https://github.com/heyhabito/helm-unittest + - helm plugin install https://github.com/helm-unittest/helm-unittest - helm dependency update - make unittests diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 14bfc13..7f8f4f0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,7 +56,7 @@ be used: ```bash # install the unittest plugin -$ helm plugin install https://github.com/heyhabito/helm-unittest +$ helm plugin install https://github.com/helm-unittest/helm-unittest # run the unittests make unittests diff --git a/Makefile b/Makefile index 2b61849..ff48c63 100644 --- a/Makefile +++ b/Makefile @@ -9,4 +9,4 @@ readme: prepare-environment .PHONY: unittests unittests: - helm unittest --helm3 --strict -f 'unittests/**/*.yaml' ./ + helm unittest --strict -f 'unittests/**/*.yaml' ./ diff --git a/unittests/init/init_directory_structure.sh.yaml b/unittests/init/init_directory_structure.sh.yaml index 7be2336..3b03f66 100644 --- a/unittests/init/init_directory_structure.sh.yaml +++ b/unittests/init/init_directory_structure.sh.yaml @@ -10,7 +10,7 @@ tests: signing.enabled: true asserts: - equal: - path: stringData.[configure_gpg_environment.sh] + path: stringData["configure_gpg_environment.sh"] value: |- #!/usr/bin/env bash set -eu @@ -19,7 +19,7 @@ tests: - it: skips gpg script block for disabled signing asserts: - equal: - path: stringData.[init_directory_structure.sh] + path: stringData["init_directory_structure.sh"] value: |- #!/usr/bin/env bash @@ -40,7 +40,7 @@ tests: signing.enabled: true asserts: - equal: - path: stringData.[init_directory_structure.sh] + path: stringData["init_directory_structure.sh"] value: |- #!/usr/bin/env bash