freeipa / freeipa-healthcheck

Check the health of a freeIPA installation
GNU General Public License v3.0
50 stars 28 forks source link

test: Handle PKI >= 11.5.0 not storing certs in CS.cfg #319

Closed rcritten closed 10 months ago

rcritten commented 10 months ago

Update the test to expect 0 results if the PKI version is

= 11.5.0.

Fixes: https://github.com/freeipa/freeipa-healthcheck/issues/317

This wasn't caught during development or by CI because PKI 11.5.0 is not available yet.

rcritten commented 10 months ago

Tested against PKI 11.5.0 in https://gitlab.com/redhat/centos-stream/rpms/ipa-healthcheck/-/merge_requests/23

flo-renaud commented 10 months ago

@rcritten thanks for the patch, works for me.

Installed PKI 11.5 from copr repo @pki/master + freeipa from @freeipa/freeipa-master-nightly Run pytest without the patch: produces 2 errors

=================================================================== short test summary info ===================================================================
FAILED tests/test_dogtag_ca.py::TestCACerts::test_ca_certs_ok - assert 0 == 6
FAILED tests/test_dogtag_ca.py::TestCACerts::test_cert_missing_from_file - IndexError: list index out of range
==================================================== 2 failed, 187 passed, 2 xpassed, 4 warnings in 3.14s =====================================================

Run pytest with the patch: the failing tests are skipped

==================================================== 187 passed, 2 skipped, 2 xpassed, 4 warnings in 3.12s ====================================================