@@ -198,10 +198,13 @@ configvar CSI_PROW_SANITY_CONTAINER "hostpath" "Kubernetes container with CSI dr
198
198
# - serial, only alpha features
199
199
# - sanity
200
200
#
201
- # Sanity testing with csi-sanity only covers the CSI driver itself and thus
202
- # is off by default. A CSI driver can change that default in its .prow.sh
203
- # by setting CSI_PROW_TESTS_SANITY.
204
- configvar CSI_PROW_TESTS " unit parallel serial parallel-alpha serial-alpha ${CSI_PROW_TESTS_SANITY} " " tests to run"
201
+ # Unknown or unsupported entries are ignored.
202
+ #
203
+ # Sanity testing with csi-sanity only covers the CSI driver itself and
204
+ # thus only makes sense in repos which provide their own CSI
205
+ # driver. Repos can enable sanity testing by setting
206
+ # CSI_PROW_TESTS_SANITY=sanity.
207
+ configvar CSI_PROW_TESTS " unit parallel serial parallel-alpha serial-alpha sanity" " tests to run"
205
208
tests_enabled () {
206
209
local t1 t2
207
210
# We want word-splitting here, so ignore: Quote to prevent word splitting, or split robustly with mapfile or read -a.
@@ -216,11 +219,16 @@ tests_enabled () {
216
219
done
217
220
return 1
218
221
}
222
+ sanity_enabled () {
223
+ [ " ${CSI_PROW_TESTS_SANITY} " = " sanity" ] && tests_enabled " sanity"
224
+ }
219
225
tests_need_kind () {
220
- tests_enabled " sanity" " parallel" " serial" " serial-alpha" " parallel-alpha"
226
+ tests_enabled " parallel" " serial" " serial-alpha" " parallel-alpha" ||
227
+ sanity_enabled
221
228
}
222
229
tests_need_non_alpha_cluster () {
223
- tests_enabled " sanity" " parallel" " serial"
230
+ tests_enabled " parallel" " serial" ||
231
+ sanity_enabled
224
232
}
225
233
tests_need_alpha_cluster () {
226
234
tests_enabled " parallel-alpha" " serial-alpha"
@@ -916,7 +924,7 @@ main () {
916
924
if install_hostpath " $images " ; then
917
925
collect_cluster_info
918
926
919
- if tests_enabled " sanity " ; then
927
+ if sanity_enabled ; then
920
928
if ! run_sanity; then
921
929
ret=1
922
930
fi
0 commit comments