mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-05 04:17:52 +00:00
0f7d77d599
Use S3Proxy pid instead of self pid, ensure correct passwd permissions, and use fusermount instead of umount so that non-root can run tests.
42 lines
848 B
Bash
Executable File
42 lines
848 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
# Require root
|
|
REQUIRE_ROOT=require-root.sh
|
|
#source $REQUIRE_ROOT
|
|
source integration-test-common.sh
|
|
|
|
java -jar "$S3PROXY_BINARY" --properties s3proxy.conf &
|
|
S3PROXY_PID="$!"
|
|
|
|
# wait for S3Proxy to start
|
|
for i in $(seq 30);
|
|
do
|
|
if exec 3<>"/dev/tcp/localhost/8080";
|
|
then
|
|
exec 3<&- # Close for read
|
|
exec 3>&- # Close for write
|
|
break
|
|
fi
|
|
sleep 1
|
|
done
|
|
|
|
# Mount the bucket
|
|
if [ ! -d $TEST_BUCKET_MOUNT_POINT_1 ]
|
|
then
|
|
mkdir -p $TEST_BUCKET_MOUNT_POINT_1
|
|
fi
|
|
$S3FS $TEST_BUCKET_1 $TEST_BUCKET_MOUNT_POINT_1 \
|
|
-o createbucket \
|
|
-o passwd_file=$S3FS_CREDENTIALS_FILE \
|
|
-o sigv2 \
|
|
-o url=http://127.0.0.1:8080 \
|
|
-o use_path_request_style
|
|
|
|
./integration-test-main.sh $TEST_BUCKET_MOUNT_POINT_1
|
|
|
|
fusermount -u $TEST_BUCKET_MOUNT_POINT_1
|
|
|
|
kill $S3PROXY_PID
|
|
|
|
echo "All tests complete."
|