Skip to content

Commit 494cf71

Browse files
committed
Actually the RPM is just called something else. Request the scripts we want instead.
1 parent f12b7cb commit 494cf71

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

osgtest/tests/test_280_gsiopenssh.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,10 @@ 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"
3534
core.state['gsisshd.can-run'] = (not (
3635
core.el_release() >= 7 and
3736
core.state['selinux.mode'] and
38-
not core.rpm_is_installed(TestStartGSIOpenSSH.policycoreutils_rpm)))
37+
not core.dependency_is_installed("/usr/sbin/sestatus")))
3938
self.skip_ok_unless(core.state['gsisshd.can-run'],
4039
"Can't run with SELinux on EL >= 7 without %s" % TestStartGSIOpenSSH.policycoreutils_rpm)
4140

@@ -48,7 +47,7 @@ def test_01_set_config(self):
4847
def test_02_setup_selinux_port(self):
4948
if not core.state['selinux.mode']:
5049
self.skip_ok('SELinux disabled')
51-
core.skip_ok_unless_installed(TestStartGSIOpenSSH.policycoreutils_rpm)
50+
core.skip_ok_unless_installed("/usr/sbin/semanage", by_depenency=True)
5251
port = core.config['gsisshd.port']
5352
core.check_system(['semanage', 'port', '--add', '-t', 'ssh_port_t', '--proto', 'tcp', port],
5453
message="Allow [gsi]sshd to use port %s" % port)

osgtest/tests/test_920_gsiopenssh.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ 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-
policycoreutils_rpm = "policycoreutils-python" if core.el_release() < 8 else "policycoreutils"
22-
core.skip_ok_unless_installed(policycoreutils_rpm)
21+
core.skip_ok_unless_installed("/usr/sbin/semanage", by_dependency=True)
2322
port = core.config['gsisshd.port']
2423
core.check_system(['semanage', 'port', '--delete', '--proto', 'tcp', port],
2524
message="Forbid [gsi]sshd to use port %s" % port)

0 commit comments

Comments
 (0)