From a1f8db6dec75994d1a2116a8ff06adcce4b31b76 Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Thu, 28 May 2026 18:27:31 +0100 Subject: [PATCH] Update CONTRIBUTING.md Signed-off-by: Evans Mungai --- CONTRIBUTING.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5ffbfaa5a..36990a7a9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -236,15 +236,17 @@ docs](https://helm.sh/docs/developers/). Use the Makefile targets (`make test`, `make test-unit`, `make test-coverage`) rather than invoking `go test ./...` directly. The Makefile passes the -`helmtest` build tag, which is required: it activates -`internal/version/version_helmtest.go` to seed testing-version sentinels. Test -binaries have no module info, so without this tag the production code path -attempts to read `k8s.io/client-go`'s version from build info and panics during -package init. +`helmtest` build tag, which is required: it selects +`internal/test/test_mode_on.go` (setting `const testMode = true`), enabling +`test.IsTestMode()` so production code paths in `internal/version` and +`pkg/chart/common` substitute stable values instead of reading build info. +Test binaries have no module info, so without this tag those code paths +panic during package init. If you run tests outside the Makefile (IDE test runners, `go test` directly, custom CI), pass `-tags helmtest`. The tag is omitted from release builds so -the `testing` package and its dependencies stay out of shipped binaries. +the `testing` package and its dependencies stay out of shipped binaries, and +branches gated on `test.IsTestMode()` are dead-code-eliminated by the compiler. ## Pull Requests