You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c749681
Browse filesBrowse the repository at this point in the historyBrowse files
test(kubernetes-nodes): assert the schematicID guard, not a literal render
The merge took upstream's talos-reconcile-heredoc_test.bats verbatim and
lost the adaptation this branch carried, so CI failed on the first case:
it sets talos.schematicID to `sch$(id)`q`z` and asserts the value reaches
the heredoc and survives literally, while this branch refuses that render
outright.
The INVARIANT above the data block admits two protections, escaping or
render-time validation. talos.version and talos.installerRepository have
only the first, so for them the assertion stays what upstream wrote: the
heredoc emits and the value survives verbatim. schematicID now has the
second as well, so the execution-level assertion inverts -- no heredoc is
produced at all -- and asserting a hostile value renders literally would
pin behaviour the guard exists to prevent.
So the coordinates case keeps schematicID at the same site with a benign
multi-segment value (`gpu/nvidia-open`, which the guard admits), and two
new cases pin the refusal itself: once through the cluster-wide
talos.schematicID and once through the pool-level schematicID this PR
adds, since the guard runs on the effective value and a pool override
that skipped it would be a hole. The escape chain stays in the template
as a second line of defence, unreachable for hostile input while the
guard holds.
hack/cozytest.sh hack/talos-reconcile-heredoc_test.bats: 4 passed.
Assisted-By: Claude <[email protected]>
Signed-off-by: Mattia Eleuteri <[email protected]>
echo"kubernetes-nodes hostile schematicID rendered instead of being rejected">&2; cat "$work/out">&2; rm -rf "$work";exit 1
134
+
fi
135
+
grep -q 'invalid schematicID'"$work/err"|| { echo"kubernetes-nodes render failed for a reason other than the schematicID guard">&2; cat "$work/err">&2; rm -rf "$work";exit 1; }
echo"kubernetes-nodes hostile per-pool schematicID rendered instead of being rejected">&2; cat "$work/out">&2; rm -rf "$work";exit 1
158
+
fi
159
+
grep -q 'invalid schematicID'"$work/err"|| { echo"kubernetes-nodes render failed for a reason other than the schematicID guard">&2; cat "$work/err">&2; rm -rf "$work";exit 1; }
0 commit comments