aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2019-12-21 14:18:24 +0200
committerMartin Pärtel <martin.partel@gmail.com>2019-12-21 14:18:24 +0200
commite07c09db52caeca249f998edd9f47483e4cb97fb (patch)
tree836b5278bdc6f6314e6ecb0827b2e0f0ed605d0d /tests
parent28f248803a7fec4dc212d1d261ddc7549fcea8b4 (diff)
downloadbindfs-e07c09db52caeca249f998edd9f47483e4cb97fb.tar.gz
Don't check that numeric UIDs and GIDs exist in user database.
A user database is not always available. For #79.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_bindfs.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb
index 1a407a1..738eef8 100755
--- a/tests/test_bindfs.rb
+++ b/tests/test_bindfs.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
#
-# Copyright 2006,2007,2008,2009,2010,2012 Martin Pärtel <martin.partel@gmail.com>
+# Copyright 2006,2007,2008,2009,2010,2012,2019 Martin Pärtel <martin.partel@gmail.com>
#
# This file is part of bindfs.
#
@@ -66,6 +66,20 @@ testenv("-u nobody -g #{nobody_group}") do
assert { File.stat('mnt/file').gid == nobody_gid }
end
+testenv("-u #{nobody_uid} -g #{nobody_gid}", :title => "numeric UID and GID") do
+ touch('src/file')
+
+ assert { File.stat('mnt/file').uid == nobody_uid }
+ assert { File.stat('mnt/file').gid == nobody_gid }
+end
+
+testenv("-u 55544 -g 55566", :title => "nonexistent UID and GID") do
+ touch('src/file')
+
+ assert { File.stat('mnt/file').uid == 55544 }
+ assert { File.stat('mnt/file').gid == 55566 }
+end
+
testenv("-p 0600:u+D") do
touch('src/file')
chmod(0777, 'src/file')