2010-11-13 23:59:23 +00:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
# Require root
|
|
|
|
REQUIRE_ROOT=require-root.sh
|
2015-01-12 22:46:24 +00:00
|
|
|
#source $REQUIRE_ROOT
|
2015-02-24 13:17:59 +00:00
|
|
|
source integration-test-common.sh
|
|
|
|
|
|
|
|
java -jar "$S3PROXY_BINARY" --properties s3proxy.conf &
|
2015-03-02 22:14:40 +00:00
|
|
|
S3PROXY_PID="$!"
|
2015-02-24 13:17:59 +00:00
|
|
|
|
|
|
|
# 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
|
2010-11-13 23:59:23 +00:00
|
|
|
|
|
|
|
# Mount the bucket
|
|
|
|
if [ ! -d $TEST_BUCKET_MOUNT_POINT_1 ]
|
|
|
|
then
|
|
|
|
mkdir -p $TEST_BUCKET_MOUNT_POINT_1
|
|
|
|
fi
|
2015-02-24 13:17:59 +00:00
|
|
|
$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
|
2011-09-26 15:20:14 +00:00
|
|
|
|
2015-01-12 22:46:24 +00:00
|
|
|
./integration-test-main.sh $TEST_BUCKET_MOUNT_POINT_1
|
2010-11-13 23:59:23 +00:00
|
|
|
|
2015-03-02 22:14:40 +00:00
|
|
|
fusermount -u $TEST_BUCKET_MOUNT_POINT_1
|
2010-12-20 05:26:27 +00:00
|
|
|
|
2015-02-24 13:17:59 +00:00
|
|
|
kill $S3PROXY_PID
|
|
|
|
|
2010-12-20 05:26:27 +00:00
|
|
|
echo "All tests complete."
|