test: Allow change containerd config

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
Jose Carlos Venegas Munoz 2018-03-12 14:58:35 +00:00
parent bdc5eee544
commit 536b381362

View File

@ -18,6 +18,13 @@ source $(dirname "${BASH_SOURCE[0]}")/utils.sh
# RESTART_WAIT_PERIOD is the period to wait before restarting containerd.
RESTART_WAIT_PERIOD=${RESTART_WAIT_PERIOD:-10}
CONTAINERD_CONFIG="--log-level=debug "
# Use a configuration file for containerd.
CONTAINERD_CONFIG_FILE=${CONTAINERD_CONFIG_FILE:-""}
if [ -f "${CONTAINERD_CONFIG_FILE}" ]; then
CONTAINERD_CONFIG+="--config $CONTAINERD_CONFIG_FILE"
fi
CONTAINERD_SOCK=/run/containerd/containerd.sock
@ -32,7 +39,7 @@ test_setup() {
exit 1
fi
sudo pkill -x containerd
keepalive "sudo ${ROOT}/_output/containerd --log-level=debug" \
keepalive "sudo ${ROOT}/_output/containerd ${CONTAINERD_CONFIG}" \
${RESTART_WAIT_PERIOD} &> ${report_dir}/containerd.log &
containerd_pid=$!
# Wait for containerd to be running by using the containerd client ctr to check the version