aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rwxr-xr-xtests/test_bindfs.rb7
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 <martin dot partel at gmail dot com>
+
+ * Fixed tests with Ruby 2.7.1 or newer.
+
2020-03-22 Martin Pärtel <martin dot partel at gmail dot com>
* 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