Fix unittests (#434)
Unclear why it only appeared now and not earlier. Co-authored-by: justusbunsi <sk.bunsenbrenner@gmail.com> Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/434 Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.io> Co-authored-by: pat-s <patrick.schratz@gmail.com> Co-committed-by: pat-s <patrick.schratz@gmail.com>
This commit is contained in:
parent
a9779c9724
commit
9f0b65f386
@ -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/helm-unittest/helm-unittest
|
||||
- helm plugin install --version 0.3.1 https://github.com/helm-unittest/helm-unittest
|
||||
- helm dependency update
|
||||
- make unittests
|
||||
|
||||
|
@ -8,6 +8,10 @@ tests:
|
||||
- it: runs gpg in batch mode
|
||||
set:
|
||||
signing.enabled: true
|
||||
signing.privateKey: |-
|
||||
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||
{placeholder}
|
||||
-----END PGP PRIVATE KEY BLOCK-----
|
||||
asserts:
|
||||
- equal:
|
||||
path: stringData["configure_gpg_environment.sh"]
|
||||
@ -38,6 +42,10 @@ tests:
|
||||
- it: adds gpg script block for enabled signing
|
||||
set:
|
||||
signing.enabled: true
|
||||
signing.privateKey: |-
|
||||
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||
{placeholder}
|
||||
-----END PGP PRIVATE KEY BLOCK-----
|
||||
asserts:
|
||||
- equal:
|
||||
path: stringData["init_directory_structure.sh"]
|
||||
|
@ -17,9 +17,9 @@ tests:
|
||||
- it: skips gpg env in `init-directories` init container
|
||||
template: templates/gitea/statefulset.yaml
|
||||
set:
|
||||
signing.enabled: true
|
||||
signing.enabled: false
|
||||
asserts:
|
||||
- contains:
|
||||
- notContains:
|
||||
path: spec.template.spec.initContainers[0].env
|
||||
content:
|
||||
name: GNUPGHOME
|
||||
|
@ -42,6 +42,7 @@ tests:
|
||||
template: templates/gitea/statefulset.yaml
|
||||
set:
|
||||
signing.enabled: true
|
||||
signing.existingSecret: "custom-gpg-secret"
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.initContainers[0].env
|
||||
@ -52,6 +53,7 @@ tests:
|
||||
template: templates/gitea/statefulset.yaml
|
||||
set:
|
||||
signing.enabled: true
|
||||
signing.existingSecret: "custom-gpg-secret"
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
@ -63,6 +65,7 @@ tests:
|
||||
set:
|
||||
signing:
|
||||
enabled: true
|
||||
existingSecret: "gitea-unittests-gpg-key"
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.volumes
|
||||
|
Loading…
x
Reference in New Issue
Block a user