Merge pull request #36216 from xlgao-zju/skip-test-docker

Automatic merge from submit-queue

skip test docker if we do not use docker as container runtime.

skip test docker if we do not use docker as container runtime.

Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
This commit is contained in:
Kubernetes Submit Queue 2016-11-29 07:32:08 -08:00 committed by GitHub
commit bfc2b77cf9

View File

@ -141,6 +141,22 @@ function test_docker {
fi
}
function test_rkt {
if [[ -n "${RKT_PATH}" ]]; then
${RKT_PATH} list 2> /dev/null 1> /dev/null
if [ "$?" != "0" ]; then
echo "Failed to successfully run 'rkt list', please verify that ${RKT_PATH} is the path of rkt binary."
exit 1
fi
else
rkt list 2> /dev/null 1> /dev/null
if [ "$?" != "0" ]; then
echo "Failed to successfully run 'rkt list', please verify that rkt is in \$PATH."
exit 1
fi
fi
}
function test_openssl_installed {
openssl version >& /dev/null
if [ "$?" != "0" ]; then
@ -519,7 +535,7 @@ function start_kubelet {
# dockerized kubelet that might be running.
cleanup_dockerized_kubelet
cred_bind=""
# path to cloud credentails.
# path to cloud credentials.
cloud_cred=""
if [ "${CLOUD_PROVIDER}" == "aws" ]; then
cloud_cred="${HOME}/.aws/credentials"
@ -651,7 +667,13 @@ EOF
fi
}
if [[ "${CONTAINER_RUNTIME}" == "docker" ]]; then
test_docker
fi
if [[ "${CONTAINER_RUNTIME}" == "rkt" ]]; then
test_rkt
fi
if [[ "${START_MODE}" != "kubeletonly" ]]; then
test_apiserver_off