Skip to content

Commit 630c952

Browse files
kvapsclaude
andcommitted
test(kubernetes): restore kubelet reservation failure-path tests
The 1843-line kubelet-reservation_test.yaml was dropped when worker bootstrap moved to Talos because its happy-path assertions probed KubeadmConfigTemplate document index 4, which no longer renders. The underlying validation logic in cluster.yaml (memory/CPU format guards, total-reserved-vs-effective invariant, mixed-unit eviction rejection, hard/soft threshold ordering) is still live and now feeds the new TalosConfigTemplate worker data, so its failure-path coverage matters. Bring back the 22 failure-path test cases, ported verbatim from the deleted file. They run BEFORE the $talosReady gate that hides the TalosConfigTemplate document in the unit-test environment (where lookup() returns nil), so each failedTemplate assertion fires independently of the lookup state. Happy-path TCT assertions remain unported: the new data field is a YAML-encoded string, which is brittle to assert via matchRegex, and mocking the dependency Secrets via kubernetesProvider is left as a follow-up. Co-Authored-By: Claude <[email protected]> Signed-off-by: Andrei Kvapil <[email protected]>
1 parent a1324fc commit 630c952

1 file changed

Lines changed: 651 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)