mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Fix #52025 The `[packages]` argument to `go test` can be confusing. If the `package` does not begin with `./`, `go test` considers it relative to `$GOPATH/src`. If it does begin with `./`, `go test` considers it relative to `pwd`. `hack/make-rules/test.sh`, and thus `make test`, use `go test`. This commit adds a verify step to `hack/make-rules/test.sh`. Before we run `go test`, we check the packages under test exist. If the user specified the package path in the incorrect format - for example they didn't prepend with `./` when they should have, the check logs a suggestion of the alternative path they should use. Running the test suites for a package is an activity many all first time contributors will take. Hopefully including a more descriptive error message, with a suggestion for a fix if applicable, will make this an easier experience. Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>