diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cea3966cc..dacb60318 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -311,8 +311,10 @@ jobs: working-directory: src/github.com/containerd/containerd - name: CRI Integration Test + env: + TEST_RUNTIME: ${{ matrix.runtime }} run: | - make cri-integration + CONTAINERD_RUNTIME=$TEST_RUNTIME make cri-integration working-directory: src/github.com/containerd/containerd - name: cri-tools critest diff --git a/hack/test-utils.sh b/hack/test-utils.sh index 86a5e49fa..b3097b019 100755 --- a/hack/test-utils.sh +++ b/hack/test-utils.sh @@ -23,13 +23,24 @@ CONTAINERD_FLAGS="--log-level=debug " # Use a configuration file for containerd. CONTAINERD_CONFIG_FILE=${CONTAINERD_CONFIG_FILE:-""} -if [ -z "${CONTAINERD_CONFIG_FILE}" ] && command -v sestatus >/dev/null 2>&1; then - selinux_config="/tmp/containerd-config-selinux.toml" - cat >${selinux_config} <<<' +# The runtime to use (ignored when CONTAINERD_CONFIG_FILE is set) +CONTAINERD_RUNTIME=${CONTAINERD_RUNTIME:-""} +if [ -z "${CONTAINERD_CONFIG_FILE}" ]; then + config_file="/tmp/containerd-config-cri.toml" + truncate --size 0 "${config_file}" + if command -v sestatus >/dev/null 2>&1; then + cat >>${config_file} <>${config_file} <