@@ -20,60 +20,16 @@ def setUp(self):
20
20
def get_srm_url_base (self ):
21
21
return 'srm://%s:%s/%s?SFN=' % (TestGFAL2Util .__hostname , TestGFAL2Util .__port , TestGFAL2Util .__sfn )
22
22
23
- def get_srm_url (self ):
24
- return self .get_srm_url_base () + TestGFAL2Util .__remote_path
25
-
26
23
def get_gftp_url_base (self ):
27
24
return 'gsiftp://%s/' % (TestGFAL2Util .__hostname )
28
25
29
- def get_gftp_url (self ):
30
- return self .get_gftp_url_base () + TestGFAL2Util .__remote_path
31
-
32
26
def setup_temp_paths (self ):
33
27
TestGFAL2Util .__temp_dir = tempfile .mkdtemp ()
34
28
TestGFAL2Util .__remote_path = TestGFAL2Util .__temp_dir + '/gfal2util_put_copied_file.txt'
35
29
TestGFAL2Util .__local_path = TestGFAL2Util .__temp_dir + '/gfal2util_get_copied_file.txt'
36
30
os .chmod (TestGFAL2Util .__temp_dir ,0o777 )
37
31
38
-
39
- @core .osgrelease (3.3 )
40
- def test_01_copy_local_to_server_gfal2_util (self ):
41
- core .skip_ok_unless_installed ('bestman2-server' , 'gfal2-plugin-srm' , 'gums-service' )
42
- self .skip_bad_unless (core .state ['bestman.server-running' ], 'bestman server not running' )
43
- self .setup_temp_paths ()
44
- os .chmod (TestGFAL2Util .__temp_dir , 0o777 )
45
- command = ('gfal-copy' , '-v' , 'file://' + TestGFAL2Util .__data_path , self .get_srm_url ())
46
- status , stdout , stderr = core .system (command , True )
47
- fail = core .diagnose ('gfal2-util copy, local to URL' , command , status , stdout , stderr )
48
- file_copied = os .path .exists (TestGFAL2Util .__remote_path )
49
- self .assertEqual (status , 0 , fail )
50
- self .assert_ (file_copied , 'Copied file missing' )
51
-
52
- @core .osgrelease (3.3 )
53
- def test_02_copy_server_to_local_gfal2_util (self ):
54
- core .skip_ok_unless_installed ('bestman2-server' , 'gfal2-plugin-srm' , 'gums-service' )
55
- self .skip_bad_unless (core .state ['bestman.server-running' ], 'bestman server not running' )
56
- command = ('gfal-copy' , '-v' , self .get_srm_url (), 'file://' + TestGFAL2Util .__local_path )
57
- status , stdout , stderr = core .system (command , True )
58
- fail = core .diagnose ('gfal2-util copy, URL to local' , command , status , stdout , stderr )
59
- file_copied = os .path .exists (TestGFAL2Util .__local_path )
60
- self .assertEqual (status , 0 , fail )
61
- self .assert_ (file_copied , 'Copied file missing' )
62
- files .remove (TestGFAL2Util .__local_path )
63
-
64
- @core .osgrelease (3.3 )
65
- def test_03_remove_server_file_gfal2_util (self ):
66
- core .skip_ok_unless_installed ('bestman2-server' , 'gfal2-plugin-srm' , 'gums-service' )
67
- self .skip_bad_unless (core .state ['bestman.server-running' ], 'bestman server not running' )
68
- command = ('gfal-rm' , '-v' , self .get_srm_url ())
69
- status , stdout , stderr = core .system (command , True )
70
- fail = core .diagnose ('gfal2-util remove, URL file' , command , status , stdout , stderr )
71
- file_removed = not os .path .exists (TestGFAL2Util .__remote_path )
72
- self .assertEqual (status , 0 , fail )
73
- self .assert_ (file_removed , 'Copied file still exists' )
74
- files .remove (TestGFAL2Util .__temp_dir )
75
-
76
- def test_04_copy_server_to_local_gfal2_gftp_util (self ):
32
+ def test_01_copy_server_to_local_gfal2_gftp_util (self ):
77
33
core .skip_ok_unless_installed ('globus-gridftp-server-progs' , 'gfal2-plugin-gridftp' )
78
34
self .skip_ok_unless (core .state ['gridftp.running-server' ], 'gridftp server not running' )
79
35
self .setup_temp_paths ()
@@ -83,7 +39,7 @@ def test_04_copy_server_to_local_gfal2_gftp_util(self):
83
39
self .assert_ (file_copied , 'Copied file missing' )
84
40
85
41
@core .elrelease (7 )
86
- def test_05_copy_local_to_server_gfal2_util (self ):
42
+ def test_02_copy_local_to_server_gfal2_util (self ):
87
43
core .skip_ok_unless_installed ('globus-gridftp-server-progs' , 'gfal2-plugin-gridftp' )
88
44
self .skip_ok_unless (core .state ['gridftp.running-server' ], 'gridftp server not running' )
89
45
file_not_created = not os .path .exists (TestGFAL2Util .__remote_path )
@@ -94,7 +50,7 @@ def test_05_copy_local_to_server_gfal2_util(self):
94
50
self .assert_ (file_copied , 'Copied file missing' )
95
51
96
52
@core .elrelease (7 )
97
- def test_06_remove_server_file_gfal2_util_gftp (self ):
53
+ def test_03_remove_server_file_gfal2_util_gftp (self ):
98
54
core .skip_ok_unless_installed ('globus-gridftp-server-progs' , 'gfal2-plugin-gridftp' )
99
55
self .skip_ok_unless (core .state ['gridftp.running-server' ], 'gridftp server not running' )
100
56
command = ('gfal-rm' , '-v' , self .get_gftp_url_base () + TestGFAL2Util .__remote_path )
@@ -103,4 +59,3 @@ def test_06_remove_server_file_gfal2_util_gftp(self):
103
59
self .assert_ (file_removed , 'Copied file still exists' )
104
60
files .remove (TestGFAL2Util .__remote_path )
105
61
files .remove (TestGFAL2Util .__local_path )
106
-
0 commit comments