Skip to content

Commit 7b96bea

Browse files
authored
Merge pull request #148 from dobsonj/add-checkpathcmd-to-prow
prow.sh: enable -csi.checkpathcmd option in csi-sanity
2 parents 09d4151 + 2d2e03b commit 7b96bea

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
@@ -1006,6 +1006,24 @@ if ! kubectl exec "${CSI_PROW_SANITY_POD}" -c "${CSI_PROW_SANITY_CONTAINER}" --
10061006
exit 1
10071007
fi
10081008
EOF
1009+
1010+
cat >"${CSI_PROW_WORK}/checkdir_in_pod.sh" <<EOF
1011+
#!/bin/sh
1012+
CHECK_PATH=\$(cat <<SCRIPT
1013+
if [ -f "\$@" ]; then
1014+
echo "file"
1015+
elif [ -d "\$@" ]; then
1016+
echo "directory"
1017+
elif [ -e "\$@" ]; then
1018+
echo "other"
1019+
else
1020+
echo "not_found"
1021+
fi
1022+
SCRIPT
1023+
)
1024+
kubectl exec "${CSI_PROW_SANITY_POD}" -c "${CSI_PROW_SANITY_CONTAINER}" -- /bin/sh -c "\${CHECK_PATH}"
1025+
EOF
1026+
10091027
chmod u+x "${CSI_PROW_WORK}"/*dir_in_pod.sh
10101028
10111029
# This cannot run in parallel, because -csi.junitfile output
@@ -1021,6 +1039,7 @@ EOF
10211039
-csi.createmountpathcmd "${CSI_PROW_WORK}/mkdir_in_pod.sh" \
10221040
-csi.removestagingpathcmd "${CSI_PROW_WORK}/rmdir_in_pod.sh" \
10231041
-csi.removemountpathcmd "${CSI_PROW_WORK}/rmdir_in_pod.sh" \
1042+
-csi.checkpathcmd "${CSI_PROW_WORK}/checkdir_in_pod.sh" \
10241043
)
10251044
10261045
ascii_to_xml () {

0 commit comments

Comments
 (0)