Gitea-HelmChart/unittests/gpg-secret/signing-enabled.yaml
towo 4869aed6ad Fix wrong reference to existingKey (#415)
### Description of the change

Fix a wrong reference to `signing.existingKey`, `signing.existingSecret` was what was meant and what is used in the chart.

### Benefits

Less confusion when trying to use the Helm chart.

### Possible drawbacks

Evangelists of `existingKey` storming the barricades even though `existingKey` is long dead.

### Applicable issues

None, nobody noticed enough to care, apparently.

Co-authored-by: Tobias Wolter <towo@towo.eu>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/415
Reviewed-by: pat-s <pat-s@noreply.gitea.io>
Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.io>
Co-authored-by: towo <towo@noreply.gitea.io>
Co-committed-by: towo <towo@noreply.gitea.io>
2023-03-21 14:16:41 +08:00

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.existingSecret`
- 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=="