#8386 ipatests: test_healthcheck should specify ipa as namespace
Closed: fixed 3 years ago by frenaud. Opened 3 years ago by frenaud.

Issue

The nightly tests for ipa-healthcheck fail in test_integration/test_ipahealthcheck.py::TestIpaHealthCheck::test_run_with_stopped_master because they are affected by the tests added by other projects, such as pki.
They should restrict healthcheck to the ipa namespace.

See for instance PR #257 with the following failure:

self = <ipatests.test_integration.test_ipahealthcheck.TestIpaHealthCheck object at 0x7f7ab3438490>
ipactl = None

    def test_run_with_stopped_master(self, ipactl):
        """
        Test output of healthcheck where master IPA services are stopped
        contains only errors regarding master being stopped and no other false
        positives.
        """
        returncode, output = run_healthcheck(
            self.master,
            output_type="human",
            failures_only=True)
        assert returncode == 1
        errors = re.findall("ERROR: .*: not running", output)
>       assert len(errors) == len(output.split('\n'))
E       assert 9 == 11
E         +9
E         -11

The test is checking that all the issues detected have the ERROR severity. This is true for ipa check but does not apply to pki checks which are CRITICAL:

DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd236:transport.py:557 CRITICAL: pki.server.healthcheck.meta.connectivity.DogtagCACertsConnectivityCheck: Internal server error. Is your CA subsystem and LDAP database up?
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd236:transport.py:557 CRITICAL: pki.server.healthcheck.meta.connectivity.DogtagKRAConnectivityCheck: Internal server error. Is your KRA subsystem and LDAP database up?

In order to avoid this false failure, the test should use the --source option in order to call only the tests provided by ipa namespace. This is possible since commit 51e701d in freeipa-healthcheck.


Metadata Update from @frenaud:
- Issue tagged with: test-failure, tests

3 years ago

Metadata Update from @rcritten:
- Issue assigned to rcritten

3 years ago

freeipa-healthcheck-0.6 was released upstream which will fix this. Packages pending in bodhi should be available in a few days.

It's in updates-testing so Azure may pass but it needs to land in updates for PR-CI. Another few days.

A change in the test will be needed to pass now that freeipa-healthcheck-0.6.0 has landed in Fedora.

Fixed upstream:
- master: 61c71e4 ipatests: Use healthcheck namespacing in stopped server test
- ipa-4-8: e91c7bc ipatests: Use healthcheck namespacing in stopped server test

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

3 years ago

Login to comment on this ticket.

Metadata