Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit 8c74267

Browse files
committed
enable test-integration target to specify runtime
Signed-off-by: Samuel Karp <[email protected]>
1 parent 9528e30 commit 8c74267

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

hack/test-utils.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ CONTAINERD_FLAGS="--log-level=debug "
2323

2424
# Use a configuration file for containerd.
2525
CONTAINERD_CONFIG_FILE=${CONTAINERD_CONFIG_FILE:-""}
26+
# The runtime to use (ignored when CONTAINERD_CONFIG_FILE is set)
27+
CONTAINERD_RUNTIME=${CONTAINERD_RUNTIME:-""}
28+
if [ -z "${CONTAINERD_CONFIG_FILE}" ]; then
29+
config_file="/tmp/containerd-config-cri.toml"
30+
if [ -n "${CONTAINERD_RUNTIME}" ]; then
31+
cat >${config_file} <<EOF
32+
[plugins.cri.containerd.default_runtime]
33+
runtime_type="${CONTAINERD_RUNTIME}"
34+
EOF
35+
fi
36+
CONTAINERD_CONFIG_FILE="${config_file}"
37+
fi
38+
2639
# CONTAINERD_TEST_SUFFIX is the suffix appended to the root/state directory used
2740
# by test containerd.
2841
CONTAINERD_TEST_SUFFIX=${CONTAINERD_TEST_SUFFIX:-"-test"}

0 commit comments

Comments
 (0)