Update CONTRIBUTING.md

Signed-off-by: Evans Mungai <mbuevans@gmail.com>
pull/32169/head
Evans Mungai 4 months ago
parent e2704403af
commit a1f8db6dec
No known key found for this signature in database
GPG Key ID: BBEB812143DD14E1

@ -236,15 +236,17 @@ docs](https://helm.sh/docs/developers/).
Use the Makefile targets (`make test`, `make test-unit`, `make test-coverage`) Use the Makefile targets (`make test`, `make test-unit`, `make test-coverage`)
rather than invoking `go test ./...` directly. The Makefile passes the rather than invoking `go test ./...` directly. The Makefile passes the
`helmtest` build tag, which is required: it activates `helmtest` build tag, which is required: it selects
`internal/version/version_helmtest.go` to seed testing-version sentinels. Test `internal/test/test_mode_on.go` (setting `const testMode = true`), enabling
binaries have no module info, so without this tag the production code path `test.IsTestMode()` so production code paths in `internal/version` and
attempts to read `k8s.io/client-go`'s version from build info and panics during `pkg/chart/common` substitute stable values instead of reading build info.
package init. 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, 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 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 ## Pull Requests

Loading…
Cancel
Save