mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
add apiserver to list of unit tested packages
This commit is contained in:
parent
e18f54f9d2
commit
a672b501df
@ -42,7 +42,7 @@ kube::test::find_integration_test_dirs() {
|
|||||||
(
|
(
|
||||||
cd ${KUBE_ROOT}
|
cd ${KUBE_ROOT}
|
||||||
find test/integration/${1-} -name '*_test.go' -print0 \
|
find test/integration/${1-} -name '*_test.go' -print0 \
|
||||||
| xargs -0n1 dirname \
|
| xargs -0n1 dirname | sed "s|^|${KUBE_GO_PACKAGE}/|" \
|
||||||
| LC_ALL=C sort -u
|
| LC_ALL=C sort -u
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -28,5 +28,5 @@ KUBEADM_PATH="${KUBEADM_PATH:=$(kube::realpath "${KUBE_ROOT}")/cluster/kubeadm.s
|
|||||||
make -C "${KUBE_ROOT}" WHAT=cmd/kubeadm
|
make -C "${KUBE_ROOT}" WHAT=cmd/kubeadm
|
||||||
|
|
||||||
make -C "${KUBE_ROOT}" test \
|
make -C "${KUBE_ROOT}" test \
|
||||||
WHAT=cmd/kubeadm/test \
|
WHAT=k8s.io/kubernetes/cmd/kubeadm/test \
|
||||||
KUBE_TEST_ARGS="--kubeadm-path '${KUBEADM_PATH}'"
|
KUBE_TEST_ARGS="--kubeadm-path '${KUBEADM_PATH}'"
|
||||||
|
@ -48,14 +48,18 @@ kube::test::find_dirs() {
|
|||||||
-o -path './staging/*' \
|
-o -path './staging/*' \
|
||||||
-o -path './vendor/*' \
|
-o -path './vendor/*' \
|
||||||
\) -prune \
|
\) -prune \
|
||||||
\) -name '*_test.go' -print0 | xargs -0n1 dirname | sed 's|^\./||' | LC_ALL=C sort -u
|
\) -name '*_test.go' -print0 | xargs -0n1 dirname | sed "s|^\./|${KUBE_GO_PACKAGE}/|" | LC_ALL=C sort -u
|
||||||
|
|
||||||
find -L . \
|
find -L . \
|
||||||
-path './_output' -prune \
|
-path './_output' -prune \
|
||||||
-o -path './vendor/k8s.io/client-go/*' \
|
-o -path './vendor/k8s.io/client-go/*' \
|
||||||
-o -path './vendor/k8s.io/apiserver/*' \
|
-o -path './vendor/k8s.io/apiserver/*' \
|
||||||
-o -path './test/e2e_node/system/*' \
|
-o -path './test/e2e_node/system/*' \
|
||||||
-name '*_test.go' -print0 | xargs -0n1 dirname | sed 's|^\./||' | LC_ALL=C sort -u
|
-name '*_test.go' -print0 | xargs -0n1 dirname | sed "s|^\./|${KUBE_GO_PACKAGE}/|" | LC_ALL=C sort -u
|
||||||
|
|
||||||
|
# run tests for apiserver
|
||||||
|
find ./staging/src/k8s.io/apiserver -name '*_test.go' \
|
||||||
|
-name '*_test.go' -print0 | xargs -0n1 dirname | sed 's|^\./staging/src/|./vendor/|' | LC_ALL=C sort -u
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,10 +210,10 @@ runTests() {
|
|||||||
# the build artifacts but doesn't run the tests. The two together provide
|
# the build artifacts but doesn't run the tests. The two together provide
|
||||||
# a large speedup for tests that do not need to be rebuilt.
|
# a large speedup for tests that do not need to be rebuilt.
|
||||||
go test -i "${goflags[@]:+${goflags[@]}}" \
|
go test -i "${goflags[@]:+${goflags[@]}}" \
|
||||||
${KUBE_RACE} ${KUBE_TIMEOUT} "${@+${@/#/${KUBE_GO_PACKAGE}/}}" \
|
${KUBE_RACE} ${KUBE_TIMEOUT} "${@}" \
|
||||||
"${testargs[@]:+${testargs[@]}}"
|
"${testargs[@]:+${testargs[@]}}"
|
||||||
go test "${goflags[@]:+${goflags[@]}}" \
|
go test "${goflags[@]:+${goflags[@]}}" \
|
||||||
${KUBE_RACE} ${KUBE_TIMEOUT} "${@+${@/#/${KUBE_GO_PACKAGE}/}}" \
|
${KUBE_RACE} ${KUBE_TIMEOUT} "${@}" \
|
||||||
"${testargs[@]:+${testargs[@]}}" \
|
"${testargs[@]:+${testargs[@]}}" \
|
||||||
| tee ${junit_filename_prefix:+"${junit_filename_prefix}.stdout"} \
|
| tee ${junit_filename_prefix:+"${junit_filename_prefix}.stdout"} \
|
||||||
| grep "${go_test_grep_pattern}" && rc=$? || rc=$?
|
| grep "${go_test_grep_pattern}" && rc=$? || rc=$?
|
||||||
@ -255,14 +259,14 @@ runTests() {
|
|||||||
${KUBE_TIMEOUT} \
|
${KUBE_TIMEOUT} \
|
||||||
-cover -covermode=\"${KUBE_COVERMODE}\" \
|
-cover -covermode=\"${KUBE_COVERMODE}\" \
|
||||||
-coverprofile=\"${cover_report_dir}/\${_pkg}/${cover_profile}\" \
|
-coverprofile=\"${cover_report_dir}/\${_pkg}/${cover_profile}\" \
|
||||||
\"${KUBE_GO_PACKAGE}/\${_pkg}\" \
|
\"${_pkg}\" \
|
||||||
${testargs[@]:+${testargs[@]}}
|
${testargs[@]:+${testargs[@]}}
|
||||||
go test ${goflags[@]:+${goflags[@]}} \
|
go test ${goflags[@]:+${goflags[@]}} \
|
||||||
${KUBE_RACE} \
|
${KUBE_RACE} \
|
||||||
${KUBE_TIMEOUT} \
|
${KUBE_TIMEOUT} \
|
||||||
-cover -covermode=\"${KUBE_COVERMODE}\" \
|
-cover -covermode=\"${KUBE_COVERMODE}\" \
|
||||||
-coverprofile=\"${cover_report_dir}/\${_pkg}/${cover_profile}\" \
|
-coverprofile=\"${cover_report_dir}/\${_pkg}/${cover_profile}\" \
|
||||||
\"${KUBE_GO_PACKAGE}/\${_pkg}\" \
|
\"${_pkg}\" \
|
||||||
${testargs[@]:+${testargs[@]}} \
|
${testargs[@]:+${testargs[@]}} \
|
||||||
| tee ${junit_filename_prefix:+\"${junit_filename_prefix}-\$_pkg_out.stdout\"} \
|
| tee ${junit_filename_prefix:+\"${junit_filename_prefix}-\$_pkg_out.stdout\"} \
|
||||||
| grep \"${go_test_grep_pattern}\"" \
|
| grep \"${go_test_grep_pattern}\"" \
|
||||||
|
Loading…
Reference in New Issue
Block a user