mirror of
https://gitea.com/gitea/helm-chart.git
synced 2024-07-04 23:34:12 +02:00
19e9b07e6e
This reverts d5ce1a47ea
and therefore adds the GPG feature back into main.
As it is a breaking change, this PR now also contains the required upgrade notes.
Closes #107 again.
Co-authored-by: justusbunsi <sk.bunsenbrenner@gmail.com>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/374
Reviewed-by: pat-s <pat-s@noreply.gitea.io>
Reviewed-by: John Olheiser <john+gitea@jolheiser.com>
41 lines
1.0 KiB
YAML
41 lines
1.0 KiB
YAML
suite: GPG secret template (signing enabled)
|
|
release:
|
|
name: gitea-unittests
|
|
namespace: testing
|
|
templates:
|
|
- templates/gitea/gpg-secret.yaml
|
|
tests:
|
|
- it: fails rendering when nothing is configured
|
|
set:
|
|
signing:
|
|
enabled: true
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Either specify `signing.privateKey` or `signing.existingKey`
|
|
- it: skips rendering using external secret reference
|
|
set:
|
|
signing:
|
|
enabled: true
|
|
existingSecret: "external-secret-reference"
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 0
|
|
- it: renders secret specification using inline gpg key
|
|
set:
|
|
signing:
|
|
enabled: true
|
|
privateKey: "gpg-key-placeholder"
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 1
|
|
- documentIndex: 0
|
|
containsDocument:
|
|
kind: Secret
|
|
apiVersion: v1
|
|
name: gitea-unittests-gpg-key
|
|
- isNotEmpty:
|
|
path: metadata.labels
|
|
- equal:
|
|
path: data.privateKey
|
|
value: "Z3BnLWtleS1wbGFjZWhvbGRlcg=="
|