Skip to content

chart tests: helm_template_test only searches the LAST document of a multi-document template #1371

Closed

Description

@bpalermo

rules_helm's test runner (helm/private/runner/runner.go, parseHelmOutput) keys rendered documents by their # Source: path, so in a template with several --- documents each later document overwrites the earlier ones. A pattern meant for an earlier document fails (it does not pass vacuously), so existing tests are not wrong, but everything before the last document of such a template cannot be tested with helm_template_test.

PR #1365 adds helm_template_match_test in bazel/helm/defs.bzl, which matches against the whole render, to test the prober's canary containers.

To do: list the multi-document templates in charts/aether, charts/prober, charts/udsecho and charts/crds, check which earlier documents have no test because of this, and cover them with the new rule.

Reported by the prober chart work for #1361/#1362 (PR #1365), not changed there.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Metadata

Metadata

Assignees

No one assigned

    Labels

    chartenhancementminor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions