Skip to content

Commit f6f4447

Browse files
tijderclaude
andcommitted
Fix helm test: drop hook-succeeded so --logs can read the test pod
CI runs `helm test ister -n ister --logs`. The test pod carried a hook-delete-policy of before-hook-creation,hook-succeeded, so Helm deleted it the moment it passed — then --logs raced to fetch logs from a pod that no longer existed and failed with "pods ister-test-connection not found", turning a green test into a red step. Drop hook-succeeded; the pod now survives a successful run so its logs are retrievable, and before-hook-creation still clears it on the next test run. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7fe7d82 commit f6f4447

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

templates/tests/test-connection.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ metadata:
66
{{- include "ister.labels" (dict "ctx" . "component" "test") | nindent 4 }}
77
annotations:
88
helm.sh/hook: test
9-
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
9+
# No hook-succeeded: that deletes the pod the instant it passes, and then
10+
# `helm test --logs` (how CI runs it) races to fetch logs from a pod that is
11+
# already gone — "pods ... not found", a failure on a green test. Keep the pod
12+
# after success; before-hook-creation still clears it on the next test run.
13+
helm.sh/hook-delete-policy: before-hook-creation
1014
spec:
1115
restartPolicy: Never
1216
automountServiceAccountToken: false

0 commit comments

Comments
 (0)