mirror of
https://gitea.com/gitea/helm-chart.git
synced 2024-06-01 18:01:24 +05:30
a4c8fa19bf
Signed-off-by: Hitesh Nayak <hiteshnayak305@gmail.com>
32 lines
977 B
YAML
32 lines
977 B
YAML
suite: Metrics secret template (gitea.metrics.serviceMonitor enabled)
|
|
release:
|
|
name: gitea-unittests
|
|
namespace: testing
|
|
templates:
|
|
- templates/gitea/metrics-secret.yaml
|
|
tests:
|
|
- it: renders nothing if gitea.metrics.serviceMonitor enabled and gitea.config.metrics.TOKEN empty
|
|
set:
|
|
gitea.metrics.serviceMonitor.enabled: true
|
|
gitea.config.metrics.TOKEN: ""
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 0
|
|
- it: renders Secret if gitea.metrics.serviceMonitor enabled and gitea.config.metrics.TOKEN not empty
|
|
set:
|
|
gitea.metrics.serviceMonitor.enabled: true
|
|
gitea.config.metrics.TOKEN: "test-token"
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 1
|
|
- documentIndex: 0
|
|
containsDocument:
|
|
kind: Secret
|
|
apiVersion: v1
|
|
name: gitea-unittests-metrics-secret
|
|
- isNotNullOrEmpty:
|
|
path: metadata.labels
|
|
- equal:
|
|
path: data.token
|
|
value: "dGVzdC10b2tlbg=="
|