Usability improvement: use the ${SUDO_USER} environment provided by sudo to create the bucket based on the user who invoked the test using sudo. Much better this way.

git-svn-id: http://s3fs.googlecode.com/svn/trunk@232 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
apetresc 2010-11-09 07:22:30 +00:00
parent ac294bc885
commit ec822185da
2 changed files with 6 additions and 2 deletions

View File

@ -4,8 +4,8 @@ S3FS=../src/s3fs
S3FS_CREDENTIALS_FILE=~/.passwd-s3fs
TEST_BUCKET_1=${USER}-s3fs-integration-test
TEST_BUCKET_MOUNT_POINT_1=/mnt/s3fs-test
TEST_BUCKET_1=${SUDO_USER}-s3fs-integration-test
TEST_BUCKET_MOUNT_POINT_1=/mnt/${TEST_BUCKET_1}
if [ ! -f "$S3FS_CREDENTIALS_FILE" ]
then

View File

@ -12,6 +12,10 @@ TEST_TEXT_FILE=test-s3fs.txt
TEST_TEXT_FILE_LENGTH=15
# 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
CUR_DIR=`pwd`
cd $TEST_BUCKET_MOUNT_POINT_1