Skip to content

Commit a8bb279

Browse files
author
efajardo
committed
Using the core library to check permissions
1 parent 032ddb0 commit a8bb279

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

osgtest/tests/test_450_xrootd.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ def test_02_test_multiuser(self):
4848
temp_dir = "/tmp/vdttest"
4949
if core.config['xrootd.multiuser'] == "ON":
5050
file_path = os.path.join(temp_dir, 'copied_file.txt')
51-
owner_uid = pwd.getpwnam(core.options.username)
52-
file_stat = os.stat(file_path)
53-
self.assertEqual(file_stat.st_uid, owner_uid)
54-
self.asset_(file_stat.st_uid == owner_uid, "The file uid owner uid was: %s but the expected one was, %s" %(file_stat.st_uid,owner_uid))
51+
result_perm = core.check_file_and_perms(file_path, core.options.username, 0o777)
52+
#owner_uid = pwd.getpwnam(core.options.username)
53+
#file_stat = os.stat(file_path)
54+
self.assertEqual(result_perm, True)
55+
#self.asset_(file_stat.st_uid == owner_uid, "The file uid owner uid was: %s but the expected one was, %s" %(file_stat.st_uid,owner_uid))
5556

5657
def test_03_xrdcp_server_to_local(self):
5758
core.skip_ok_unless_installed('xrootd', 'xrootd-client', by_dependency=True)

0 commit comments

Comments
 (0)