mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 14:11:14 +00:00
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:
@@ -130,6 +130,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
|
||||
@@ -477,7 +493,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"
|
||||
@@ -609,7 +625,13 @@ EOF
|
||||
fi
|
||||
}
|
||||
|
||||
test_docker
|
||||
if [[ "${CONTAINER_RUNTIME}" == "docker" ]]; then
|
||||
test_docker
|
||||
fi
|
||||
|
||||
if [[ "${CONTAINER_RUNTIME}" == "rkt" ]]; then
|
||||
test_rkt
|
||||
fi
|
||||
|
||||
if [[ "${START_MODE}" != "kubeletonly" ]]; then
|
||||
test_apiserver_off
|
||||
|
Reference in New Issue
Block a user