Skip to content

Commit aa65abc

Browse files
author
efajardo
committed
Debugging the correct owner
1 parent a7186aa commit aa65abc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

osgtest/tests/test_450_xrootd.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,12 @@ def test_02_test_multiuser(self):
4747
core.skip_ok_unless_installed('xrootd', 'xrootd-client', 'xrootd-multiuser', by_dependency=True)
4848
temp_dir = "/tmp/vdttest"
4949
if core.config['xrootd.multiuser'] == "ON":
50-
result = core.check_file_and_perms(os.path.join(temp_dir, 'copied_file.txt'),core.options.username,0o777)
51-
shutil.rmtree(temp_dir)
52-
self.assertEqual(result, True)
50+
file_path = os.path.join(temp_dir, 'copied_file.txt')
51+
expected_owner_uid = pwd.getpwnam(core.options.username)
52+
file_stat = os.stat(file_path)
53+
file_stat.st_uid == owner_uid and
54+
self.assertEqual(file_stat.st_uid, owner_uid)
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))
5356

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

0 commit comments

Comments
 (0)