This is an automated email from the ASF dual-hosted git repository.
hossman pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 26d9e56 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
26d9e56 is described below
commit 26d9e56c33e7d8393a12bc5059c51b487e59ac34
Author: Chris Hostetter <[email protected]>
AuthorDate: Fri Jul 23 16:36:15 2021 -0700
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
---
solr/docker/tests/shared.sh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/solr/docker/tests/shared.sh b/solr/docker/tests/shared.sh
index b363517..8ef9809 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
}