From 536b38136283f5bb0a9c751cb38769ee27b7dfc7 Mon Sep 17 00:00:00 2001 From: Jose Carlos Venegas Munoz Date: Mon, 12 Mar 2018 14:58:35 +0000 Subject: [PATCH] test: Allow change containerd config Signed-off-by: Jose Carlos Venegas Munoz --- hack/test-utils.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hack/test-utils.sh b/hack/test-utils.sh index 42bbe319e..8a4832fde 100755 --- a/hack/test-utils.sh +++ b/hack/test-utils.sh @@ -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