mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-22 16:58:55 +00:00
Merge pull request #1111 from gaul/test/read-external-object
Add test to read an externally created object
This commit is contained in:
commit
8cc008c501
@ -304,11 +304,19 @@ function test_external_modification {
|
|||||||
echo "old" > ${TEST_TEXT_FILE}
|
echo "old" > ${TEST_TEXT_FILE}
|
||||||
OBJECT_NAME="$(basename $PWD)/${TEST_TEXT_FILE}"
|
OBJECT_NAME="$(basename $PWD)/${TEST_TEXT_FILE}"
|
||||||
sleep 2
|
sleep 2
|
||||||
echo "new new" | AWS_ACCESS_KEY_ID=local-identity AWS_SECRET_ACCESS_KEY=local-credential aws s3 --endpoint-url "${S3_URL}" --no-verify-ssl cp - "s3://${TEST_BUCKET_1}/${OBJECT_NAME}"
|
echo "new new" | aws_cli cp - "s3://${TEST_BUCKET_1}/${OBJECT_NAME}"
|
||||||
cmp ${TEST_TEXT_FILE} <(echo "new new")
|
cmp ${TEST_TEXT_FILE} <(echo "new new")
|
||||||
rm -f ${TEST_TEXT_FILE}
|
rm -f ${TEST_TEXT_FILE}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function test_read_external_object() {
|
||||||
|
describe "create objects via aws CLI and read via s3fs"
|
||||||
|
OBJECT_NAME="$(basename $PWD)/${TEST_TEXT_FILE}"
|
||||||
|
echo "test" | aws_cli cp - "s3://${TEST_BUCKET_1}/${OBJECT_NAME}"
|
||||||
|
cmp ${TEST_TEXT_FILE} <(echo "test")
|
||||||
|
rm -f ${TEST_TEXT_FILE}
|
||||||
|
}
|
||||||
|
|
||||||
function test_rename_before_close {
|
function test_rename_before_close {
|
||||||
describe "Testing rename before close ..."
|
describe "Testing rename before close ..."
|
||||||
(
|
(
|
||||||
@ -579,6 +587,7 @@ function add_all_tests {
|
|||||||
add_tests test_list
|
add_tests test_list
|
||||||
add_tests test_remove_nonempty_directory
|
add_tests test_remove_nonempty_directory
|
||||||
add_tests test_external_modification
|
add_tests test_external_modification
|
||||||
|
add_tests test_read_external_object
|
||||||
add_tests test_rename_before_close
|
add_tests test_rename_before_close
|
||||||
add_tests test_multipart_upload
|
add_tests test_multipart_upload
|
||||||
add_tests test_multipart_copy
|
add_tests test_multipart_copy
|
||||||
|
@ -218,3 +218,7 @@ function get_mtime() {
|
|||||||
stat -c %Y "$1"
|
stat -c %Y "$1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function aws_cli() {
|
||||||
|
AWS_ACCESS_KEY_ID=local-identity AWS_SECRET_ACCESS_KEY=local-credential aws s3 --endpoint-url "${S3_URL}" --no-verify-ssl $*
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user