#9482 Test failure in test_integration.test_ipahealthcheck.py::TestIpaHealthCheck::test_source_ipahealthcheck_ipa_host_check_ipahostkeytab
Closed: fixed a year ago by frenaud. Opened a year ago by rcritten.

Issue

The test est_integration.test_ipahealthcheck.py::TestIpaHealthCheck::test_source_ipahealthcheck_ipa_host_check_ipahostkeytab is failing when calling ipa-healthcheck because the expected message changed in freeipa-healthcheck 0.15 in commit https://github.com/freeipa/freeipa-healthcheck/commit/e69589d5

self = <ipatests.test_integration.test_ipahealthcheck.TestIpaHealthCheck object at 0x7f60eb12e650>

    def test_source_ipahealthcheck_ipa_host_check_ipahostkeytab(self):
        """
        Testcase checks behaviour of check IPAHostKeytab in source
        ipahealthcheck.ipa.host when GSSAPI credentials cannot be obtained
        from host's keytab.
        """
        msg = (
            "Minor (2529639107): No credentials cache found"
        )

        with tasks.FileBackup(self.master, paths.KRB5_KEYTAB):
            self.master.run_command(["rm", "-f", paths.KRB5_KEYTAB])
            returncode, data = run_healthcheck(
                self.master,
                source="ipahealthcheck.ipa.host",
                check="IPAHostKeytab",
            )
            assert returncode == 1
            assert data[0]["result"] == "ERROR"
>           assert msg in data[0]["kw"]["msg"]
E           AssertionError: assert 'Minor (2529639107): No credentials cache found' in 'Service {service} keytab {path} does not exist.'

The check returned

[
 {
    "source": "ipahealthcheck.ipa.host",
    "check": "IPAHostKeytab",
    "result": "ERROR",
    "uuid": "ccedfd2e-3866-4164-a37e-8e2e3b4f32f3",
    "when": "20231114160542Z",
    "duration": "0.000104",
    "kw": { 
      "service": "host",
      "path": "/etc/krb5.keytab",
      "msg": "Service {service} keytab {path} does not exist."
    } 
  } 
]   

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

a year ago

master:

  • d659d21 ipatests: ignore nsslapd-accesslog-logbuffering WARN in healthcheck
  • f00b52c ipatests: fix expected output for ipahealthcheck.ipa.host

ipa-4-11:

  • 7e76329 ipatests: ignore nsslapd-accesslog-logbuffering WARN in healthcheck
  • faf8be4 ipatests: fix expected output for ipahealthcheck.ipa.host

ipa-4-10:

  • 9bc582a ipatests: ignore nsslapd-accesslog-logbuffering WARN in healthcheck
  • f83c32f ipatests: fix expected output for ipahealthcheck.ipa.host

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

a year ago

ipa-4-9:

  • 5afda72 ipatests: ignore nsslapd-accesslog-logbuffering WARN in healthcheck
  • f1cfe7d ipatests: fix expected output for ipahealthcheck.ipa.host

Log in to comment on this ticket.

Metadata