pulled kubeadm tests out of runTests to run before tests in test/cmd

Added timeout for https://github.com/kubernetes/kubeadm/issues/1430
pull/564/head
Thomas Runyon 2019-03-01 06:46:41 -05:00
parent a514fa042e
commit 1e44e33517
3 changed files with 22 additions and 2 deletions

View File

@ -97,6 +97,20 @@ function create_node() {
__EOF__
}
# Run it if:
# 1) $WHAT is empty
# 2) $WHAT is not empty and kubeadm is part of $WHAT
WHAT=${WHAT:-}
if [[ ${WHAT} == "" || ${WHAT} =~ .*kubeadm.* ]] ; then
kube::log::status "Running kubeadm tests"
run_kubeadm_tests
# if we ONLY want to run kubeadm, then exit here.
if [[ ${WHAT} == "kubeadm" ]]; then
kube::log::status "TESTS PASSED"
exit 0
fi
fi
kube::log::status "Running kubectl tests for kube-apiserver"
setup

View File

@ -28,9 +28,12 @@ run_kubeadm_tests() {
# comment this out to save yourself from needlessly building here.
make -C "${KUBE_ROOT}" WHAT=cmd/kubeadm
#TODO(runyontr): Remove the the KUBE_TIMEOUT override when
# kubernetes/kubeadm/issues/1430 is fixed
make -C "${KUBE_ROOT}" test \
WHAT=k8s.io/kubernetes/cmd/kubeadm/test/cmd \
KUBE_TEST_ARGS="--kubeadm-path '${KUBEADM_PATH}'"
KUBE_TEST_ARGS="--kubeadm-path '${KUBEADM_PATH}'" \
KUBE_TIMEOUT="--timeout 600s"
set +o nounset
set +o errexit
}

View File

@ -397,7 +397,10 @@ runTests() {
if [[ -n "${WHAT-}" ]]; then
for pkg in ${WHAT}
do
record_command run_${pkg}_tests
# running of kubeadm is captured in hack/make-targets/test-cmd.sh
if [[ "$pkg" != "kubeadm" ]]; then
record_command run_${pkg}_tests
fi
done
cleanup_tests
return