Skip to content

Commit

Permalink
ipatests: Skip tests for ipahealtcheck tests for specific pki version
Browse files Browse the repository at this point in the history
CADogtagCertsConfigCheck is no more available on RHEL9, hence the
respective tests are skipped.

Check 'CADogtagCertsConfigCheck' not found in Source 'pki.server.healthcheck.meta.csconfig'

Ref: https://issues.redhat.com/browse/RHEL-21367

Signed-off-by: Sudhir Menon <sumenon@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
  • Loading branch information
menonsudhir authored and flo-renaud committed Feb 2, 2024
1 parent 9c470d1 commit 7f84995
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions ipatests/test_integration/test_ipahealthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,11 @@ def test_source_ipahealthcheck_dogtag_ca_dogtagcertsconfigcheck(self):
Testcase checks behaviour of check DogtagCertsConfigCheck in
ipahealthcheck.dogtag.ca when tomcat config file is removed
"""
version = tasks.get_pki_version(self.master)
if version >= parse_version("11.5"):
pytest.skip("Skipping test for 11.5 pki version, since the "
"check CADogtagCertsConfigCheck itself is skipped "
"See ipa-healthcheck ticket 317")
returncode, data = run_healthcheck(
self.master,
"ipahealthcheck.dogtag.ca",
Expand Down Expand Up @@ -1453,13 +1458,21 @@ def test_ipa_healthcheck_renew_internal_cert(self):
This testcase checks that CADogtagCertsConfigCheck can handle
cert renewal, when there can be two certs with the same nickname
"""
if (tasks.get_pki_version(self.master) < tasks.parse_version('11.4.0')):
if (tasks.get_pki_version(
self.master) < tasks.parse_version('11.4.0')):
raise pytest.skip("PKI known issue #2022561")
self.master.run_command(['ipa-cacert-manage', 'renew', '--self-signed'])
elif (tasks.get_pki_version(
self.master) >= tasks.parse_version('11.5.0')):
raise pytest.skip("Skipping test for 11.5 pki version, since "
"check CADogtagCertsConfigCheck is "
"not present in source "
"pki.server.healthcheck.meta.csconfig")
self.master.run_command(
['ipa-cacert-manage', 'renew', '--self-signed']
)
returncode, data = run_healthcheck(
self.master,
"pki.server.healthcheck.meta.csconfig",
"CADogtagCertsConfigCheck",
self.master, "pki.server.healthcheck.meta.csconfig",
"CADogtagCertsConfigCheck"
)
assert returncode == 0
for check in data:
Expand Down

0 comments on commit 7f84995

Please sign in to comment.