From 7db5c9178f989e70e1ff2e05744c92be81f3bf92 Mon Sep 17 00:00:00 2001 From: Martin Pärtel Date: Mon, 13 Apr 2020 11:52:40 +0300 Subject: Fixed tests with Ruby 2.7.1 or newer. --- tests/test_bindfs.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests') 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 -- cgit v1.2.3