Skip to content

Commit c10a6ef

Browse files
author
efajardo
committed
Asserting against the ownership of the file
1 parent b9ad964 commit c10a6ef

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

osgtest/tests/test_150_xrootd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_03_configure_multiuser(self):
7676
# We need both multiuser and gsi part to test multiuser
7777
if core.config['xrootd.multiuser'] == "ON" and core.config['xrootd.gsi'] == "ON":
7878
xrootd_multiuser_conf = "xrootd.fslib libXrdMultiuser.so default"
79-
files.append(core.config['xrootd.config'], xrootd_multiuser_conf, owner='xrootd')
79+
files.append(core.config['xrootd.config'], xrootd_multiuser_conf, owner='xrootd', backup=False)
8080

8181
def test_04_start_xrootd(self):
8282
core.skip_ok_unless_installed('xrootd', by_dependency=True)

osgtest/tests/test_450_xrootd.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import shutil
44
import tempfile
55
import pwd
6+
from os import stat
67

78
import osgtest.library.core as core
89
import osgtest.library.files as files
@@ -46,8 +47,9 @@ def test_01_xrdcp_local_to_server(self):
4647
def test_02_test_multiuser(self):
4748
core.skip_ok_unless_installed('xrootd', 'xrootd-client', 'xrootd-multiuser', by_dependency=True)
4849
if core.config['xrootd.multiuser'] == "ON":
49-
success = core.check_file_and_perms("/tmp/vdttest/copied_file.txt","vdttest",0o7777)
50-
self.assert_(success, "Copied file is not owned by vdttest")
50+
vdttestpid = pwd.getpwnam("vdttest")
51+
owner = stat("/tmp/vdttest/copied_file.txt").st_uid
52+
self.assertEqual(owner, vdttestpid)
5153

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

0 commit comments

Comments
 (0)