Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix healthcheck CI test #6146

Closed
jchapma opened this issue Apr 12, 2024 · 1 comment
Closed

fix healthcheck CI test #6146

jchapma opened this issue Apr 12, 2024 · 1 comment
Labels
CI test Involves lib389 CI test needs triage The issue will be triaged during scrum

Comments

@jchapma
Copy link
Contributor

jchapma commented Apr 12, 2024

Issue Description
Some healthcheck CI tests are failing

Steps to Reproduce
sudo pytest -s -v ./dirsrvtests/tests/suites/healthcheck/healthcheck_test.py

Expected results
Tests should pass

Screenshots
FAILED dirsrvtests/tests/suites/healthcheck/healthcheck_test.py::test_healthcheck_standalone
FAILED dirsrvtests/tests/suites/healthcheck/healthcheck_test.py::test_healthcheck_standalone_tls
FAILED dirsrvtests/tests/suites/healthcheck/healthcheck_test.py::test_healthcheck_replication
FAILED dirsrvtests/tests/suites/healthcheck/healthcheck_test.py::test_healthcheck_replication_tls
FAILED dirsrvtests/tests/suites/healthcheck/healthcheck_test.py::test_healthcheck_backend_missing_mapping_tree
ERROR dirsrvtests/tests/suites/healthcheck/healthcheck_test.py::test_lint_backend_implementation

@jchapma jchapma added the needs triage The issue will be triaged during scrum label Apr 12, 2024
jchapma added a commit to jchapma/389-ds-base that referenced this issue Apr 12, 2024
Bug description: Some healthcheck CI tests are failing

Fix description: Remove reference to fixture,enable log buffering

Relates: 389ds#6146

Reviewed by:
@progier389
Copy link
Contributor

FYI: I got the same issue while running test after backporting the lmdb fixes to 2.5 branch
And in fact healthcheck_test.py is not the only one being impacted healthcheck_config_test.py is also impacted.

I identified a first problem: by default the auditlog is not buffered and healthcheck issue a warning about it.
Guess we should not directly use topology_st but a
healthcheck_topology module fixture that ensure that the instance is properly configured to have no healthcheck warning by default.

should also improve run_healthcheck_and_flush_log to help the debbuging.
Typically by adding the expected result and the testcase name in the log:

  •    log.info(f'Use healthcheck with --json option. Expecting {searched_code}. Testcase is {os.getenv("PYTEST_CURRENT_TEST")}.')
    

and also log a message if the result is None

@progier389 progier389 added the CI test Involves lib389 CI test label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI test Involves lib389 CI test needs triage The issue will be triaged during scrum
Projects
None yet
Development

No branches or pull requests

2 participants