ipatests: Test for pki.server.healthcheck.clones.connectivity_and_data

This test checks that when
'pki.server.healthcheck.clones.connectivity_and_data' check is run
'Source 'pki.server.healthcheck.clones.connectivity_and_data' not found'
is not displayed.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2041995

Signed-off-by: Sudhir Menon <sumenon@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
Sudhir Menon 2022-02-24 13:27:29 +05:30 committed by Florence Blanc-Renaud
parent e32bfd44ee
commit 67488d2342

View File

@ -123,6 +123,7 @@ metaservices_checks = [
ipafiles_checks = ["IPAFileNSSDBCheck", "IPAFileCheck", "TomcatFileCheck"] ipafiles_checks = ["IPAFileNSSDBCheck", "IPAFileCheck", "TomcatFileCheck"]
dogtag_checks = ["DogtagCertsConfigCheck", "DogtagCertsConnectivityCheck"] dogtag_checks = ["DogtagCertsConfigCheck", "DogtagCertsConnectivityCheck"]
pki_clone_checks = ["ClonesConnectivyAndDataCheck"]
iparoles_checks = ["IPACRLManagerCheck", "IPARenewalMasterCheck"] iparoles_checks = ["IPACRLManagerCheck", "IPARenewalMasterCheck"]
replication_checks = ["ReplicationCheck"] replication_checks = ["ReplicationCheck"]
replication_checks_0_4 = ["ReplicationConflictCheck"] replication_checks_0_4 = ["ReplicationConflictCheck"]
@ -1034,6 +1035,23 @@ class TestIpaHealthCheck(IntegrationTest):
assert check["result"] == "CRITICAL" assert check["result"] == "CRITICAL"
assert exception_msg in check["kw"]["exception"] assert exception_msg in check["kw"]["exception"]
def test_source_pki_server_clones_connectivity_and_data(self):
"""
This testcase checks that when ClonesConnectivyAndDataCheck
is run it doesn't display source not found error
"""
error_msg = (
"Source 'pki.server.healthcheck.clones.connectivity_and_data' "
"not found"
)
result = self.master.run_command(
["ipa-healthcheck", "--source",
"pki.server.healthcheck.clones.connectivity_and_data"]
)
assert error_msg not in result.stdout_text
for check in pki_clone_checks:
assert check in result.stdout_text
@pytest.fixture @pytest.fixture
def modify_tls(self, restart_service): def modify_tls(self, restart_service):
""" """