Skip to content

Commit 5e83a71

Browse files
samuelkarpqiutongs
authored andcommitted
cri-integration: pass ENABLE_CRI_SANDBOXES to test
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 <[email protected]> (cherry picked from commit 7a66f70) Signed-off-by: Qiutong Song <[email protected]>
1 parent 1db5e31 commit 5e83a71

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

script/test/cri-integration.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,17 @@ mkdir -p "${REPORT_DIR}"
4242
test_setup "${REPORT_DIR}"
4343

4444
# Run integration test.
45-
${sudo} bin/cri-integration.test --test.run="${FOCUS}" --test.v \
45+
CMD=""
46+
if [ -n "${sudo}" ]; then
47+
CMD+="${sudo} "
48+
# sudo strips environment variables, so add ENABLE_CRI_SANDBOXES back if present
49+
if [ -n "${ENABLE_CRI_SANDBOXES}" ]; then
50+
CMD+="ENABLE_CRI_SANDBOXES='${ENABLE_CRI_SANDBOXES}' "
51+
fi
52+
fi
53+
CMD+="${PWD}/bin/cri-integration.test"
54+
55+
${CMD} --test.run="${FOCUS}" --test.v \
4656
--cri-endpoint="${CONTAINERD_SOCK}" \
4757
--cri-root="${CRI_ROOT}" \
4858
--runtime-handler="${RUNTIME}" \

0 commit comments

Comments
 (0)