Files
cozystack/hack
Marian Koreniuk 7843ec98b5 test(capi): catch a vendored provider whose blob and YAML have drifted
Each provider package ships the manifests twice: the YAML a reviewer reads and
the gzip blob the chart mounts. `make components` writes both from one download
and nothing keeps them together afterwards, so editing the YAML alone produces a
diff that reviews cleanly while the cluster runs the version nobody read.

Both new provider packages are covered. A second pair of tests holds the
version together: capi-operator hashes the provider spec and the config Secret
into applied-spec-hash, and the ConfigMap is in neither, so a bump that
regenerates the vendored files while the ConfigMap name and spec.version stay
behind installs the old provider and reports the old version, with nothing
reporting an error. The Makefile variable, the ConfigMap name and spec.version
have to be one value. A third pair checks the vendored files against the
SHA-256 sums the Makefile pins, so the pin holds even when nobody runs
`make components`.

Written for dash rather than bash, since the repo's runner executes these under
sh — process substitution is not available there.

Each pair goes red on the edit it exists for: a YAML edited without
regenerating the blob, a Makefile version bumped on its own, a ConfigMap
renamed without spec.version, and a vendored file that no longer matches its
pinned sum.

Signed-off-by: Marian Koreniuk <moriarti@cp.if.ua>
Assisted-by: LLM
2026-09-25 16:26:05 +02:00
..
2026-02-17 22:54:12 +01:00