Skip to content

Commit

Permalink
prow.sh: enable -csi.checkpathcmd option in csi-sanity
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dobsonj committed May 7, 2021
1 parent 6616a6b commit 2d2e03b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions prow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,24 @@ if ! kubectl exec "${CSI_PROW_SANITY_POD}" -c "${CSI_PROW_SANITY_CONTAINER}" --
exit 1
fi
EOF
cat >"${CSI_PROW_WORK}/checkdir_in_pod.sh" <<EOF
#!/bin/sh
CHECK_PATH=\$(cat <<SCRIPT
if [ -f "\$@" ]; then
echo "file"
elif [ -d "\$@" ]; then
echo "directory"
elif [ -e "\$@" ]; then
echo "other"
else
echo "not_found"
fi
SCRIPT
)
kubectl exec "${CSI_PROW_SANITY_POD}" -c "${CSI_PROW_SANITY_CONTAINER}" -- /bin/sh -c "\${CHECK_PATH}"
EOF
chmod u+x "${CSI_PROW_WORK}"/*dir_in_pod.sh
# This cannot run in parallel, because -csi.junitfile output
Expand All @@ -990,6 +1008,7 @@ EOF
-csi.createmountpathcmd "${CSI_PROW_WORK}/mkdir_in_pod.sh" \
-csi.removestagingpathcmd "${CSI_PROW_WORK}/rmdir_in_pod.sh" \
-csi.removemountpathcmd "${CSI_PROW_WORK}/rmdir_in_pod.sh" \
-csi.checkpathcmd "${CSI_PROW_WORK}/checkdir_in_pod.sh" \
)
ascii_to_xml () {
Expand Down

0 comments on commit 2d2e03b

Please sign in to comment.