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. --- ChangeLog | 4 ++++ tests/test_bindfs.rb | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2459346..fc983a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2020-04-13 Martin Pärtel + + * Fixed tests with Ruby 2.7.1 or newer. + 2020-03-22 Martin Pärtel * Defined _DARWIN_BETTER_REALPATH to get a non-broken realpath() on Catalina (issue #83). 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