Files
cozystack/hack
Aleksei Sviridkin 1b67521344 test(hack): skip request-timeout calls that name a kubeconfig or context
The check exempts a file only when it names KUBECONFIG. A hook script
under files/ that gets KUBECONFIG from the env its template sets has no
reason to name it, so a call that goes through that kubeconfig with
--context is flagged as an in-cluster call. That is what turned the
capi-providers-core upgrade script red until #5398 made it name
KUBECONFIG; the next script written the same way hits it again.

A call that passes a non-empty --context or --kubeconfig does not take
the in-cluster branch: client-go serves it from the loaded kubeconfig,
and without one --context fails with "context was not found" instead of
falling back to localhost:8080. Skip such lines. An empty value does
fall back, so it is still reported, and so is a bare call in the same
file.

Fixes: ffb3b6faf3 ("test(hack): check hook scripts under files/ for --request-timeout")
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-11-23 19:02:12 +03:00
..
2026-02-17 22:54:12 +01:00