From e07c09db52caeca249f998edd9f47483e4cb97fb Mon Sep 17 00:00:00 2001 From: Martin Pärtel Date: Sat, 21 Dec 2019 14:18:24 +0200 Subject: Don't check that numeric UIDs and GIDs exist in user database. A user database is not always available. For #79. --- tests/test_bindfs.rb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'tests') 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 +# Copyright 2006,2007,2008,2009,2010,2012,2019 Martin Pärtel # # 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') -- cgit v1.2.3