mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-18 02:05:13 +00:00
Fix remove_nonempty_directory test bug
Wrap the attempt to rmdir in an if statement, otherwise the entire test process exists (errexit is set). This test expects the rmdir to fail.
This commit is contained in:
parent
849e66f6a1
commit
dac9844765
@ -261,7 +261,10 @@ function test_remove_nonempty_directory {
|
|||||||
echo "Testing removing a non-empty directory"
|
echo "Testing removing a non-empty directory"
|
||||||
mk_test_dir
|
mk_test_dir
|
||||||
touch "${TEST_DIR}/file"
|
touch "${TEST_DIR}/file"
|
||||||
rmdir "${TEST_DIR}" 2>&1 | grep -q "Directory not empty"
|
if ! (rmdir "${TEST_DIR}" 2>&1 | grep -q "Directory not empty"); then
|
||||||
|
echo "Did not get \"Directory not empty\""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
rm "${TEST_DIR}/file"
|
rm "${TEST_DIR}/file"
|
||||||
rm_test_dir
|
rm_test_dir
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user