aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_bindfs.rb
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2020-04-13 11:52:40 +0300
committerMartin Pärtel <martin.partel@gmail.com>2020-04-13 11:52:40 +0300
commit7db5c9178f989e70e1ff2e05744c92be81f3bf92 (patch)
treeedcab675db57a1efed644bcbcb3f8ab8aeed0be7 /tests/test_bindfs.rb
parent2d70777f6207f9f67d6b73c62de72172a65efa47 (diff)
downloadbindfs-7db5c9178f989e70e1ff2e05744c92be81f3bf92.tar.gz
Fixed tests with Ruby 2.7.1 or newer.
Diffstat (limited to 'tests/test_bindfs.rb')
-rwxr-xr-xtests/test_bindfs.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb
index 738eef8..f8eb70e 100755
--- a/tests/test_bindfs.rb
+++ b/tests/test_bindfs.rb
@@ -317,8 +317,11 @@ 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') }
+ # We don't use FileUtils.mv because it was changed in Ruby 2.7.1 to
+ # fall back to copying on EPERM:
+ # https://github.com/ruby/ruby/commit/7d3d8e79fe9cc9f21cd4341f0a6fb2e6306688fd
+ assert_exception(EPERM) { File.rename('mnt/file', 'mnt/file2') }
+ assert_exception(EPERM) { File.rename('mnt/dir', 'mnt/dir2') }
end
root_testenv("--map=nobody/root:@#{nobody_group}/@#{root_group}") do