mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +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
 | 
					    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 {
 | 
					function test_openssl_installed {
 | 
				
			||||||
    openssl version >& /dev/null
 | 
					    openssl version >& /dev/null
 | 
				
			||||||
    if [ "$?" != "0" ]; then
 | 
					    if [ "$?" != "0" ]; then
 | 
				
			||||||
@@ -477,7 +493,7 @@ function start_kubelet {
 | 
				
			|||||||
      # dockerized kubelet that might be running.
 | 
					      # dockerized kubelet that might be running.
 | 
				
			||||||
      cleanup_dockerized_kubelet
 | 
					      cleanup_dockerized_kubelet
 | 
				
			||||||
      cred_bind=""
 | 
					      cred_bind=""
 | 
				
			||||||
      # path to cloud credentails.
 | 
					      # path to cloud credentials.
 | 
				
			||||||
      cloud_cred=""
 | 
					      cloud_cred=""
 | 
				
			||||||
      if [ "${CLOUD_PROVIDER}" == "aws" ]; then
 | 
					      if [ "${CLOUD_PROVIDER}" == "aws" ]; then
 | 
				
			||||||
          cloud_cred="${HOME}/.aws/credentials"
 | 
					          cloud_cred="${HOME}/.aws/credentials"
 | 
				
			||||||
@@ -609,7 +625,13 @@ EOF
 | 
				
			|||||||
fi
 | 
					fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
test_docker
 | 
					if [[ "${CONTAINER_RUNTIME}" == "docker" ]]; then
 | 
				
			||||||
 | 
					  test_docker
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [[ "${CONTAINER_RUNTIME}" == "rkt" ]]; then
 | 
				
			||||||
 | 
					  test_rkt
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [[ "${START_MODE}" != "kubeletonly" ]]; then
 | 
					if [[ "${START_MODE}" != "kubeletonly" ]]; then
 | 
				
			||||||
  test_apiserver_off
 | 
					  test_apiserver_off
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user