mirror of
https://gitea.com/gitea/helm-chart.git
synced 2024-07-04 23:34:12 +02:00
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
|
image: alpine:3.17
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing make helm git bash
|
- 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
|
- helm dependency update
|
||||||
- make unittests
|
- make unittests
|
||||||
|
|
||||||
|
@ -8,6 +8,10 @@ tests:
|
|||||||
- it: runs gpg in batch mode
|
- it: runs gpg in batch mode
|
||||||
set:
|
set:
|
||||||
signing.enabled: true
|
signing.enabled: true
|
||||||
|
signing.privateKey: |-
|
||||||
|
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||||
|
{placeholder}
|
||||||
|
-----END PGP PRIVATE KEY BLOCK-----
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
path: stringData["configure_gpg_environment.sh"]
|
path: stringData["configure_gpg_environment.sh"]
|
||||||
@ -38,6 +42,10 @@ tests:
|
|||||||
- it: adds gpg script block for enabled signing
|
- it: adds gpg script block for enabled signing
|
||||||
set:
|
set:
|
||||||
signing.enabled: true
|
signing.enabled: true
|
||||||
|
signing.privateKey: |-
|
||||||
|
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||||
|
{placeholder}
|
||||||
|
-----END PGP PRIVATE KEY BLOCK-----
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
path: stringData["init_directory_structure.sh"]
|
path: stringData["init_directory_structure.sh"]
|
||||||
|
@ -17,9 +17,9 @@ tests:
|
|||||||
- it: skips gpg env in `init-directories` init container
|
- it: skips gpg env in `init-directories` init container
|
||||||
template: templates/gitea/statefulset.yaml
|
template: templates/gitea/statefulset.yaml
|
||||||
set:
|
set:
|
||||||
signing.enabled: true
|
signing.enabled: false
|
||||||
asserts:
|
asserts:
|
||||||
- contains:
|
- notContains:
|
||||||
path: spec.template.spec.initContainers[0].env
|
path: spec.template.spec.initContainers[0].env
|
||||||
content:
|
content:
|
||||||
name: GNUPGHOME
|
name: GNUPGHOME
|
||||||
|
@ -42,6 +42,7 @@ tests:
|
|||||||
template: templates/gitea/statefulset.yaml
|
template: templates/gitea/statefulset.yaml
|
||||||
set:
|
set:
|
||||||
signing.enabled: true
|
signing.enabled: true
|
||||||
|
signing.existingSecret: "custom-gpg-secret"
|
||||||
asserts:
|
asserts:
|
||||||
- contains:
|
- contains:
|
||||||
path: spec.template.spec.initContainers[0].env
|
path: spec.template.spec.initContainers[0].env
|
||||||
@ -52,6 +53,7 @@ tests:
|
|||||||
template: templates/gitea/statefulset.yaml
|
template: templates/gitea/statefulset.yaml
|
||||||
set:
|
set:
|
||||||
signing.enabled: true
|
signing.enabled: true
|
||||||
|
signing.existingSecret: "custom-gpg-secret"
|
||||||
asserts:
|
asserts:
|
||||||
- contains:
|
- contains:
|
||||||
path: spec.template.spec.containers[0].env
|
path: spec.template.spec.containers[0].env
|
||||||
@ -63,6 +65,7 @@ tests:
|
|||||||
set:
|
set:
|
||||||
signing:
|
signing:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
existingSecret: "gitea-unittests-gpg-key"
|
||||||
asserts:
|
asserts:
|
||||||
- contains:
|
- contains:
|
||||||
path: spec.template.spec.volumes
|
path: spec.template.spec.volumes
|
||||||
|
Loading…
Reference in New Issue
Block a user