Files
cozystack/packages/system/cert-manager-crds
Aleksei Sviridkin ead3ab4ed6 test(cert-manager-crds): pin the keep annotation on the CRDs
The CRDs carry helm.sh/resource-policy: keep, which is what stops a
release uninstall from deleting them and taking every Certificate,
Issuer and Order in the cluster with it. Nothing asserted that.

The annotation is not local to this package on either side: it comes
from the upstream template under a conditional, the value that switches
it on is ours, and the templates are refilled from the vendored upstream
chart by packages/system/cert-manager on its own update. The assertion
reads the rendered output, so it does not depend on which of those
moves.

Scope by wildcard rather than a list of filenames, so a CRD that
upstream starts shipping is covered without editing the test, and assert
the kind alongside the annotation, since the annotation assertion on its
own accepts a non-CRD document that carries it.

Add the test: target too. hack/helm-unit-tests.sh runs a package's suite
only when its Makefile defines that target, so without it the fixtures
sit unread and the run reports success on a chart that has already lost
the annotation.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-08-07 14:36:06 +03:00
..
2024-11-04 19:01:33 +01:00
2024-11-04 19:01:33 +01:00