Skip to content

Commit

Permalink
Merge pull request #148 from dobsonj/add-checkpathcmd-to-prow
Browse files Browse the repository at this point in the history
prow.sh: enable -csi.checkpathcmd option in csi-sanity
  • Loading branch information
k8s-ci-robot authored May 8, 2021
2 parents 09d4151 + 2d2e03b commit 7b96bea
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 @@ -1006,6 +1006,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 @@ -1021,6 +1039,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 7b96bea

Please sign in to comment.