Apache Solr open-source search software
SOLR-15543: testDocker now fails fast (instead of an obtuse delayed failure) if test needs setfacl on the host system but it doesn't work
Chris Hostetter26d9e56c33e7
diff --git a/solr/docker/tests/shared.sh b/solr/docker/tests/shared.shindex b3635175969..8ef98094676 100755--- a/solr/docker/tests/shared.sh+++ b/solr/docker/tests/shared.sh@@ -112,8 +112,12 @@ function prepare_dir_to_mount {# to write to it as the user will fail. To deal with that, set the ACL to allow that.# If you can't use setfacl (eg on macOS), you'll have to chown the directory to 8983, or apply world# write permissions.- if command -v setfacl &> /dev/null; then- setfacl -m "u:$userid:rwx" "$folder"+ if ! command -v setfacl &> /dev/null; then+ echo "Test case requires the 'setfacl' command but it can not be found"+ exit 1+ fi+ if ! setfacl -m "u:$userid:rwx" "$folder"; then+ echo "Unable to add permissions for $userid to '$folder'"fi}