Files
cozystack/packages/system/kubevirt-operator
Aleksei Sviridkin 024a2d54c6 test(kubevirt): add a unit-test target for the operator package
hack/helm-unit-tests.sh discovers work by probing `make -C <dir> -n
test`, so a package with no such target is skipped in silence: the
whole per-package loop, including the guards that catch a suite which
asserts nothing, never reaches it. kubevirt-operator had no target and
no suite, so nothing rendered the package after a refresh and the sweep
stayed green reporting success.

The suite pins what the vendoring recipe is supposed to produce. The
local PrometheusRule has to still be there, addressed as a template so
helm-unittest fails outright if it goes missing. The operator
Deployment, selected by name rather than by index because the vendored
file is one long document stream, has to carry the pinned image and the
rewritten namespace, and no Namespace object may survive the second
transform. VIRT_OPERATOR_IMAGE and KUBEVIRT_VERSION are pinned beside
the image because the operator reads the latter to choose the tags for
virt-controller, virt-handler and virt-launcher: a manifest whose image
moved while those did not deploys a split control plane.

The Makefile check is the other half: helm-unittest reads the tree and
cannot see RELEASE, so bumping the pin without re-running `update`
would leave every assertion happily green against the old release.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-07 01:23:29 +03:00
..
2024-02-08 12:04:32 +01:00