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

<!-- [Place an '[X]' (no spaces) in all applicable fields. Please remove unrelated fields.] -->

- [ ] 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 <justusbunsi@noreply.gitea.io>
Reviewed-by: pat-s <pat-s@noreply.gitea.io>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-committed-by: Michael Kriese <michael.kriese@visualon.de>
This commit is contained in:
Michael Kriese 2023-03-21 23:53:13 +08:00 committed by pat-s
parent 4869aed6ad
commit 1be9fae08b
4 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -9,4 +9,4 @@ readme: prepare-environment
.PHONY: unittests
unittests:
helm unittest --helm3 --strict -f 'unittests/**/*.yaml' ./
helm unittest --strict -f 'unittests/**/*.yaml' ./

View File

@ -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