diff options
author | Martin Pärtel <martin.partel@gmail.com> | 2017-11-30 12:28:57 +0200 |
---|---|---|
committer | Martin Pärtel <martin.partel@gmail.com> | 2017-11-30 12:28:57 +0200 |
commit | b5c97861a3b71e3e5391bf2d2458fdff845a19fe (patch) | |
tree | e3b054d490d27fa52238fac039a9a304fc7bf707 /tests/test_bindfs.rb | |
parent | cb7a9dc70f740ef344029b540af8bb71fe99ddd0 (diff) | |
download | bindfs-b5c97861a3b71e3e5391bf2d2458fdff845a19fe.tar.gz |
Cleaned up PR #61.
For consistency, renamed the new options to --delete-deny and --rename-deny.
Diffstat (limited to 'tests/test_bindfs.rb')
-rwxr-xr-x | tests/test_bindfs.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb index d3f54b9..33eaaa4 100755 --- a/tests/test_bindfs.rb +++ b/tests/test_bindfs.rb @@ -293,6 +293,20 @@ testenv("--chmod-filter=g-w,o-rwx") do assert { File.stat('src/file').mode & 0777 == 0640 } end +testenv("--delete-deny") do + touch('src/file') + mkdir('src/dir') + assert_exception(EPERM) { rm('mnt/file') } + assert_exception(EPERM) { rmdir('mnt/dir') } +end + +testenv("--rename-deny") do + touch('src/file') + mkdir('src/dir') + assert_exception(EPERM) { mv('mnt/file', 'mnt/file2') } + assert_exception(EPERM) { mv('mnt/dir', 'mnt/dir2') } +end + root_testenv("--map=nobody/root:@#{nobody_group}/@#{root_group}") do touch('src/file') chown('nobody', nobody_group, 'src/file') |