Skip to content

Commit 7c67817

Browse files
Merge pull request #159 from edquist/SOFTWARE-3485.xrd-490-tests
use separate config.d file for xrootd >= 1:4.9.0 (SOFTWARE-3485)
2 parents e7b9b88 + 5e2487f commit 7c67817

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

osgtest/tests/test_150_xrootd.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def test_01_start_xrootd(self):
3636
core.config['certs.xrootdcert'] = '/etc/grid-security/xrd/xrdcert.pem'
3737
core.config['certs.xrootdkey'] = '/etc/grid-security/xrd/xrdkey.pem'
3838
core.config['xrootd.config'] = '/etc/xrootd/xrootd-clustered.cfg'
39+
core.config['xrootd.config-extra'] = '/etc/xrootd/config.d/99-osg-test.cfg'
3940
core.config['xrootd.port'] = XROOTD_PORT
4041
core.config['xrootd.multiuser'] = False
4142
core.state['xrootd.started-server'] = False
@@ -62,9 +63,14 @@ def test_01_start_xrootd(self):
6263
owner="xrootd",
6364
chown=(user.pw_uid, user.pw_gid))
6465

65-
files.append(core.config['xrootd.config'],
66-
XROOTD_CFG_TEXT % (sec_protocol, core.config['xrootd.port']),
67-
owner='xrootd', backup=True)
66+
if core.PackageVersion('xrootd') < '1:4.9.0':
67+
files.append(core.config['xrootd.config'],
68+
XROOTD_CFG_TEXT % (sec_protocol, core.config['xrootd.port']),
69+
owner='xrootd', backup=True)
70+
else:
71+
files.write(core.config['xrootd.config-extra'],
72+
XROOTD_CFG_TEXT % (sec_protocol, core.config['xrootd.port']),
73+
owner='xrootd', backup=True, chmod=0o644)
6874
authfile = '/etc/xrootd/auth_file'
6975
files.write(authfile, AUTHFILE_TEXT, owner="xrootd", chown=(user.pw_uid, user.pw_gid))
7076

@@ -73,12 +79,18 @@ def test_01_start_xrootd(self):
7379
def test_02_configure_hdfs(self):
7480
core.skip_ok_unless_installed('xrootd-hdfs')
7581
hdfs_config = "ofs.osslib /usr/lib64/libXrdHdfs.so"
76-
files.append(core.config['xrootd.config'], hdfs_config, backup=False)
82+
if core.PackageVersion('xrootd') < '1:4.9.0':
83+
files.append(core.config['xrootd.config'], hdfs_config, backup=False)
84+
else:
85+
files.append(core.config['xrootd.config-extra'], hdfs_config, backup=False)
7786

7887
def test_03_configure_multiuser(self):
7988
core.skip_ok_unless_installed('xrootd-multiuser','globus-proxy-utils', by_dependency=True)
8089
xrootd_multiuser_conf = "xrootd.fslib libXrdMultiuser.so default"
81-
files.append(core.config['xrootd.config'], xrootd_multiuser_conf, owner='xrootd', backup=False)
90+
if core.PackageVersion('xrootd') < '1:4.9.0':
91+
files.append(core.config['xrootd.config'], xrootd_multiuser_conf, owner='xrootd', backup=False)
92+
else:
93+
files.append(core.config['xrootd.config-extra'], xrootd_multiuser_conf, owner='xrootd', backup=False)
8294
core.config['xrootd.multiuser'] = True
8395

8496
def test_04_start_xrootd(self):

osgtest/tests/test_840_xrootd.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ class TestStopXrootd(osgunittest.OSGTestCase):
77

88
def test_01_stop_xrootd(self):
99
if core.state['xrootd.backups-exist']:
10-
files.restore(core.config['xrootd.config'], "xrootd")
10+
if core.PackageVersion('xrootd') < '1:4.9.0':
11+
files.restore(core.config['xrootd.config'], "xrootd")
12+
else:
13+
files.restore(core.config['xrootd.config-extra'], "xrootd")
1114
files.restore('/etc/xrootd/auth_file', "xrootd")
1215
if not core.rpm_is_installed('xrootd-lcmaps'):
1316
files.restore('/etc/grid-security/xrd/xrdmapfile', "xrootd")

0 commit comments

Comments
 (0)