Skip to content

Commit b4fae3d

Browse files
author
efajardo
committed
Not removing the file we are testing for
1 parent 1a810c0 commit b4fae3d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

osgtest/tests/test_450_xrootd.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ def test_01_xrdcp_local_to_server(self):
2020
if core.config['xrootd.gsi'] == "ON":
2121
core.skip_ok_unless_installed('globus-proxy-utils')
2222
self.skip_bad_unless(core.state['xrootd.started-server'] is True, 'Server not running')
23-
23+
temp_dir = "/tmp/vdttest"
2424
hostname = socket.getfqdn()
2525
if core.config['xrootd.gsi'] == "ON":
26-
temp_dir = "/tmp/vdttest"
2726
if not os.path.exists(temp_dir):
2827
os.mkdir(temp_dir)
2928
user = pwd.getpwnam(core.options.username)
@@ -39,16 +38,18 @@ def test_01_xrdcp_local_to_server(self):
3938
fail = core.diagnose('xrdcp copy, local to URL',
4039
command, status, stdout, stderr)
4140
file_copied = os.path.exists(os.path.join(temp_dir, 'copied_file.txt'))
42-
shutil.rmtree(temp_dir)
43-
41+
if core.config['xrootd.multiuser'] != "ON":
42+
shutil.rmtree(temp_dir)
4443
self.assertEqual(status, 0, fail)
4544
self.assert_(file_copied, 'Copied file missing')
4645

4746
def test_02_test_multiuser(self):
4847
core.skip_ok_unless_installed('xrootd', 'xrootd-client', 'xrootd-multiuser', by_dependency=True)
48+
temp_dir = "/tmp/vdttest"
4949
if core.config['xrootd.multiuser'] == "ON":
5050
vdttestpid = pwd.getpwnam("vdttest")
51-
owner = stat("/tmp/vdttest/copied_file.txt").st_uid
51+
owner = stat(os.path.join(temp_dir, 'copied_file.txt')).st_uid
52+
shutil.rmtree(temp_dir)
5253
self.assertEqual(owner, vdttestpid)
5354

5455
def test_03_xrdcp_server_to_local(self):

0 commit comments

Comments
 (0)