Merge pull request #632 from jcvenegas/tests-find-containerd-path

tests: Use path found to containerd.
This commit is contained in:
Lantao Liu 2018-03-02 00:06:47 -08:00 committed by GitHub
commit 3d382e2f5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,13 +40,16 @@ test_setup() {
fi fi
# Start containerd # Start containerd
if [ ! -x "$(command -v containerd)" ]; then local containerd=$(command -v containerd)
if [ ! -x "${containerd}" ]; then
echo "containerd is not installed, please run hack/install-deps.sh" echo "containerd is not installed, please run hack/install-deps.sh"
exit 1 exit 1
fi fi
sudo pkill -x cri-containerd sudo pkill -x cri-containerd
sudo pkill -x containerd sudo pkill -x containerd
keepalive "sudo containerd" ${RESTART_WAIT_PERIOD} &> ${report_dir}/containerd.log & echo "using ${containerd}"
echo "containerd version: $(${containerd} --version)"
keepalive "sudo ${containerd}" ${RESTART_WAIT_PERIOD} &> ${report_dir}/containerd.log &
containerd_pid=$! containerd_pid=$!
# Wait for containerd to be running by using the containerd client ctr to check the version # Wait for containerd to be running by using the containerd client ctr to check the version
# of the containerd server. Wait an increasing amount of time after each of five attempts # of the containerd server. Wait an increasing amount of time after each of five attempts