Skip to content

Commit

Permalink
cri-integration: pass ENABLE_CRI_SANDBOXES to test
Browse files Browse the repository at this point in the history
ENABLE_CRI_SANDBOXES is already passed to the daemon, but was not passed
to the tests prior to this commit. Passing ENABLE_CRI_SANDBOXES to the
tests allows tests to be skipped if they're not appropriate for sbserver
(or the functionality hasn't been implemented in sbserver yet).

Signed-off-by: Samuel Karp <samuelkarp@google.com>
(cherry picked from commit 7a66f70)
Signed-off-by: Qiutong Song <songqt01@gmail.com>
  • Loading branch information
samuelkarp authored and qiutongs committed Sep 30, 2022
1 parent 1db5e31 commit 5e83a71
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion script/test/cri-integration.sh
Expand Up @@ -42,7 +42,17 @@ mkdir -p "${REPORT_DIR}"
test_setup "${REPORT_DIR}"

# Run integration test.
${sudo} bin/cri-integration.test --test.run="${FOCUS}" --test.v \
CMD=""
if [ -n "${sudo}" ]; then
CMD+="${sudo} "
# sudo strips environment variables, so add ENABLE_CRI_SANDBOXES back if present
if [ -n "${ENABLE_CRI_SANDBOXES}" ]; then
CMD+="ENABLE_CRI_SANDBOXES='${ENABLE_CRI_SANDBOXES}' "
fi
fi
CMD+="${PWD}/bin/cri-integration.test"

${CMD} --test.run="${FOCUS}" --test.v \
--cri-endpoint="${CONTAINERD_SOCK}" \
--cri-root="${CRI_ROOT}" \
--runtime-handler="${RUNTIME}" \
Expand Down

0 comments on commit 5e83a71

Please sign in to comment.