Skip to content

Commit 453ef34

Browse files
author
efajardo
committed
Addressing style changes
1 parent 7c68ea5 commit 453ef34

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

osgtest/tests/test_150_xrootd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_01_start_xrootd(self):
3737
core.config['certs.xrootdkey'] = '/etc/grid-security/xrd/xrdkey.pem'
3838
core.config['xrootd.config'] = '/etc/xrootd/xrootd-clustered.cfg'
3939
core.config['xrootd.port'] = XROOTD_PORT
40-
core.config['xrootd.multiuser'] = "OFF"
40+
core.config['xrootd.multiuser'] = False
4141
core.state['xrootd.started-server'] = False
4242
core.state['xrootd.backups-exist'] = False
4343

@@ -77,15 +77,15 @@ def test_02_configure_hdfs(self):
7777

7878
def test_03_configure_multiuser(self):
7979
core.skip_ok_unless_installed('xrootd-multiuser','globus-proxy-utils', by_dependency=True)
80-
core.config['xrootd.multiuser'] = "ON"
8180
xrootd_multiuser_conf = "xrootd.fslib libXrdMultiuser.so default"
8281
files.append(core.config['xrootd.config'], xrootd_multiuser_conf, owner='xrootd', backup=False)
82+
core.config['xrootd.multiuser'] = True
8383

8484
def test_04_start_xrootd(self):
8585
core.skip_ok_unless_installed('xrootd', by_dependency=True)
8686
if core.el_release() < 7:
8787
core.config['xrootd_service'] = "xrootd"
88-
elif core.config['xrootd.multiuser'] == "ON":
88+
elif core.config['xrootd.multiuser']:
8989
core.config['xrootd_service'] = "xrootd-privileged@clustered"
9090
else:
9191
core.config['xrootd_service'] = "xrootd@clustered"

osgtest/tests/test_450_xrootd.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,10 @@ def test_01_xrdcp_local_to_server(self):
4040

4141
def test_02_xrootd_multiuser(self):
4242
core.skip_ok_unless_installed('xrootd', 'xrootd-client', 'globus-proxy-utils', 'xrootd-multiuser', by_dependency=True)
43-
self.skip_bad_unless(core.state['xrootd.copied-to-server'] is True, 'File to check ownership does not exist')
44-
temp_dir = core.config['xrootd.tmp-dir']
45-
if core.config['xrootd.multiuser'] == "ON" and core.state['xrootd.copied-to-server']:
46-
file_path = os.path.join(temp_dir, 'copied_file.txt')
47-
result_perm = core.check_file_ownership(file_path, core.options.username)
48-
self.assertEqual(result_perm, True)
43+
self.skip_bad_unless(core.config['xrootd.multiuser'], 'Xrootd not configured for multiuser')
44+
self.skip_bad_unless(core.state['xrootd.copied-to-server'], 'File to check ownership does not exist')
45+
file_path = os.path.join(core.config['xrootd.tmp-dir'], 'copied_file.txt')
46+
self.assertEqual(core.check_file_ownership(file_path, core.options.username), True)
4947

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

0 commit comments

Comments
 (0)