The `templates/gitea` subdirectory did not group anything meaningful, since every template of this chart belongs to Gitea. It only duplicated the chart name in every path and forced the unit tests to spell out `templates/gitea/<name>.yaml`, while `_helpers.tpl` and `NOTES.txt` already lived directly in `templates`. All templates now live in `templates`, which matches the layout of the bundled sub-charts and the Helm defaults. The checksum helper in `templates/_secrets.tpl` built its include path from `$root.Template.BasePath` and therefore carried the subdirectory in a `printf` format string instead of a literal path. Without adjusting it the chart failed to render with "no template gitea/templates/gitea/secret_config.yaml associated with template gotpl". Co-authored-by: Copilot <copilot@github.com>
24 lines
719 B
YAML
24 lines
719 B
YAML
suite: ServiceMonitor template (monitoring disabled)
|
|
release:
|
|
name: gitea-unittests
|
|
namespace: testing
|
|
templates:
|
|
- templates/serviceMonitor.yaml
|
|
tests:
|
|
- it: renders nothing if gitea.metrics.serviceMonitor disabled and gitea.metrics.token empty
|
|
set:
|
|
gitea.metrics.enabled: false
|
|
gitea.metrics.token: ""
|
|
gitea.metrics.serviceMonitor.enabled: false
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 0
|
|
- it: renders nothing if gitea.metrics.serviceMonitor disabled and gitea.metrics.token not empty
|
|
set:
|
|
gitea.metrics.enabled: false
|
|
gitea.metrics.token: "test-token"
|
|
gitea.metrics.serviceMonitor.enabled: false
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 0
|