From b5c97861a3b71e3e5391bf2d2458fdff845a19fe Mon Sep 17 00:00:00 2001 From: Martin Pärtel Date: Thu, 30 Nov 2017 12:28:57 +0200 Subject: Cleaned up PR #61. For consistency, renamed the new options to --delete-deny and --rename-deny. --- tests/test_bindfs.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') 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') -- cgit v1.2.3