#9668 Nightly test failure (@pki/master) in test_ipahealthcheck.py::TestIpaHealthCheck::test_source_pki_server_clones_connectivity_and_data
Closed: fixed by frenaud. Opened by frenaud.

The nightly test test_ipahealthcheck.py::TestIpaHealthCheck::test_source_pki_server_clones_connectivity_and_data is failing when @pki/master copr repo is enabled. This repo contains a nightly build of pki's main branch.

Test failure visible in nightly PR 4001 with the following logs and report:

self = <ipatests.test_integration.test_ipahealthcheck.TestIpaHealthCheck object at 0x7ff8c3f18890>
    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"]
        )
test_integration/test_ipahealthcheck.py:1226: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <ipatests.pytest_ipa.integration.host.Host master.ipa.test (master)>
argv = ['ipa-healthcheck', '--source', 'pki.server.healthcheck.clones.connectivity_and_data']
set_env = True, stdin_text = None, log_stdout = True, raiseonerr = True
cwd = None, bg = False, encoding = 'utf-8', ok_returncode = 0
    def run_command(self, argv, set_env=True, stdin_text=None,
                    log_stdout=True, raiseonerr=True,
                    cwd=None, bg=False, encoding='utf-8', ok_returncode=0):
        """Wrapper around run_command to log stderr on raiseonerr=True
        :param ok_returncode: return code considered to be correct,
                              you can pass an integer or sequence of integers
        """
        result = super().run_command(
            argv, set_env=set_env, stdin_text=stdin_text,
            log_stdout=log_stdout, raiseonerr=False, cwd=cwd, bg=bg,
            encoding=encoding
        )
        # in FIPS mode SSH may print noise to stderr, remove the string
        # "FIPS mode initialized" + optional newline.
        result.stderr_bytes = FIPS_NOISE_RE.sub(b'', result.stderr_bytes)
        try:
            result_ok = result.returncode in ok_returncode
        except TypeError:
            result_ok = result.returncode == ok_returncode
        if not result_ok and raiseonerr:
            result.log.error('stderr: %s', result.stderr_text)
>           raise subprocess.CalledProcessError(
                result.returncode, argv,
                result.stdout_text, result.stderr_text
            )
E           subprocess.CalledProcessError: Command '['ipa-healthcheck', '--source', 'pki.server.healthcheck.clones.connectivity_and_data']' returned non-zero exit status 1.
pytest_ipa/integration/host.py:202: CalledProcessError
----------------------------- Captured stderr call -----------------------------
ipa: ERROR: stderr: 
------------------------------ Captured log call -------------------------------
INFO     ipatests.pytest_ipa.integration.host.Host.master.IPAOpenSSHTransport:transport.py:391 RUN ['ipa-healthcheck', '--source', 'pki.server.healthcheck.clones.connectivity_and_data']
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd418:transport.py:513 RUN ['ipa-healthcheck', '--source', 'pki.server.healthcheck.clones.connectivity_and_data']
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd418:transport.py:557 Source 'pki.server.healthcheck.clones.connectivity_and_data' not found
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd418:transport.py:217 Exit code: 1
ERROR    ipatests.pytest_ipa.integration.host.Host.master.cmd418:host.py:201 stderr:

Test scenario:
install IPA server and replica with CA, call ipa-healthcheck --source pki.server.healthcheck.clones.connectivity_and_data

The command is failing with Source 'pki.server.healthcheck.clones.connectivity_and_data' not found.
Pki removed this check with commit https://github.com/dogtagpki/pki/commit/74dc7993171b2c1a0b5bbf03e3d396507bb4b337 Drop ClonesConnectivyAndDataCheck from pki-healthcheck

We need to adapt our test code and skip the test for recent versions of PKI.


Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/7542

master:

  • 929dc568808f12917a738b51def45c31fb351ddc test_ipahealthcheck: skip connectivity_and_data check

ipa-4-12:

  • d8d4c5507bd3784d323e6836ff8456ba9608f115 test_ipahealthcheck: skip connectivity_and_data check

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata