Skip to content

Commit 2d2e03b

Browse files
committed
prow.sh: enable -csi.checkpathcmd option in csi-sanity
This enables the -csi.checkpathcmd option, which is needed in order to test if TargetPath was successfully removed by the CSI driver as part of NodeUnpublishVolume.
1 parent 6616a6b commit 2d2e03b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Diff for: prow.sh

+19
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,24 @@ if ! kubectl exec "${CSI_PROW_SANITY_POD}" -c "${CSI_PROW_SANITY_CONTAINER}" --
975975
exit 1
976976
fi
977977
EOF
978+
979+
cat >"${CSI_PROW_WORK}/checkdir_in_pod.sh" <<EOF
980+
#!/bin/sh
981+
CHECK_PATH=\$(cat <<SCRIPT
982+
if [ -f "\$@" ]; then
983+
echo "file"
984+
elif [ -d "\$@" ]; then
985+
echo "directory"
986+
elif [ -e "\$@" ]; then
987+
echo "other"
988+
else
989+
echo "not_found"
990+
fi
991+
SCRIPT
992+
)
993+
kubectl exec "${CSI_PROW_SANITY_POD}" -c "${CSI_PROW_SANITY_CONTAINER}" -- /bin/sh -c "\${CHECK_PATH}"
994+
EOF
995+
978996
chmod u+x "${CSI_PROW_WORK}"/*dir_in_pod.sh
979997
980998
# This cannot run in parallel, because -csi.junitfile output
@@ -990,6 +1008,7 @@ EOF
9901008
-csi.createmountpathcmd "${CSI_PROW_WORK}/mkdir_in_pod.sh" \
9911009
-csi.removestagingpathcmd "${CSI_PROW_WORK}/rmdir_in_pod.sh" \
9921010
-csi.removemountpathcmd "${CSI_PROW_WORK}/rmdir_in_pod.sh" \
1011+
-csi.checkpathcmd "${CSI_PROW_WORK}/checkdir_in_pod.sh" \
9931012
)
9941013
9951014
ascii_to_xml () {

0 commit comments

Comments
 (0)