Skip to content

Commit f12b7cb

Browse files
committed
EL8 didn't split the python parts out of policycoreutils
1 parent 9428beb commit f12b7cb

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

osgtest/tests/test_280_gsiopenssh.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ def setUp(self):
3131

3232
def test_01_set_config(self):
3333
port = core.config['gsisshd.port'] = '2222'
34+
TestStartGSIOpenSSH.policycoreutils_rpm = "policycoreutils-python" if core.el_release() < 8 else "policycoreutils"
3435
core.state['gsisshd.can-run'] = (not (
3536
core.el_release() >= 7 and
3637
core.state['selinux.mode'] and
37-
not core.rpm_is_installed('policycoreutils-python')))
38+
not core.rpm_is_installed(TestStartGSIOpenSSH.policycoreutils_rpm)))
3839
self.skip_ok_unless(core.state['gsisshd.can-run'],
39-
"Can't run with SELinux on EL >= 7 without policycoreutils-python")
40+
"Can't run with SELinux on EL >= 7 without %s" % TestStartGSIOpenSSH.policycoreutils_rpm)
4041

4142
files.write(
4243
SSHD_CONFIG,
@@ -47,7 +48,7 @@ def test_01_set_config(self):
4748
def test_02_setup_selinux_port(self):
4849
if not core.state['selinux.mode']:
4950
self.skip_ok('SELinux disabled')
50-
core.skip_ok_unless_installed('policycoreutils-python')
51+
core.skip_ok_unless_installed(TestStartGSIOpenSSH.policycoreutils_rpm)
5152
port = core.config['gsisshd.port']
5253
core.check_system(['semanage', 'port', '--add', '-t', 'ssh_port_t', '--proto', 'tcp', port],
5354
message="Allow [gsi]sshd to use port %s" % port)

osgtest/tests/test_920_gsiopenssh.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ def test_01_stop(self):
1818
def test_02_unset_selinux_port(self):
1919
if not core.state['selinux.mode']:
2020
self.skip_ok('no selinux')
21-
core.skip_ok_unless_installed('policycoreutils-python')
21+
policycoreutils_rpm = "policycoreutils-python" if core.el_release() < 8 else "policycoreutils"
22+
core.skip_ok_unless_installed(policycoreutils_rpm)
2223
port = core.config['gsisshd.port']
2324
core.check_system(['semanage', 'port', '--delete', '--proto', 'tcp', port],
2425
message="Forbid [gsi]sshd to use port %s" % port)

0 commit comments

Comments
 (0)