@@ -20,10 +20,9 @@ def test_01_xrdcp_local_to_server(self):
20
20
if core .config ['xrootd.gsi' ] == "ON" :
21
21
core .skip_ok_unless_installed ('globus-proxy-utils' )
22
22
self .skip_bad_unless (core .state ['xrootd.started-server' ] is True , 'Server not running' )
23
-
23
+ temp_dir = "/tmp/vdttest"
24
24
hostname = socket .getfqdn ()
25
25
if core .config ['xrootd.gsi' ] == "ON" :
26
- temp_dir = "/tmp/vdttest"
27
26
if not os .path .exists (temp_dir ):
28
27
os .mkdir (temp_dir )
29
28
user = pwd .getpwnam (core .options .username )
@@ -39,16 +38,18 @@ def test_01_xrdcp_local_to_server(self):
39
38
fail = core .diagnose ('xrdcp copy, local to URL' ,
40
39
command , status , stdout , stderr )
41
40
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 )
44
43
self .assertEqual (status , 0 , fail )
45
44
self .assert_ (file_copied , 'Copied file missing' )
46
45
47
46
def test_02_test_multiuser (self ):
48
47
core .skip_ok_unless_installed ('xrootd' , 'xrootd-client' , 'xrootd-multiuser' , by_dependency = True )
48
+ temp_dir = "/tmp/vdttest"
49
49
if core .config ['xrootd.multiuser' ] == "ON" :
50
50
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 )
52
53
self .assertEqual (owner , vdttestpid )
53
54
54
55
def test_03_xrdcp_server_to_local (self ):
0 commit comments