Excise KUBE_GOPATH from coverage build

This commit is contained in:
Tim Hockin 2022-05-20 15:45:52 -07:00
parent 0af3106442
commit 8cb8535d9c
No known key found for this signature in database

View File

@ -729,7 +729,8 @@ kube::golang::is_instrumented_package() {
# Echos the path to a dummy test used for coverage information. # Echos the path to a dummy test used for coverage information.
kube::golang::path_for_coverage_dummy_test() { kube::golang::path_for_coverage_dummy_test() {
local package="$1" local package="$1"
local path="${KUBE_GOPATH}/src/${package}" local path
path=$(go list -find -f '{{.Dir}}' "${package}")
local name local name
name=$(basename "${package}") name=$(basename "${package}")
echo "${path}/zz_generated_${name}_test.go" echo "${path}/zz_generated_${name}_test.go"