#51108 Issue 50873 - Fix issues with healthcheck tool
Closed by spichugi. Opened by bsmejkal.
bsmejkal/389-ds-base return_health  into  master

Download 51108.patch

Description:
I finished remaining tests for healthcheck tool.
I moved some of the tests to separate files because one large file was becoming messy.
Also the test in health_sync_test.py is separate because it is time sensitive to reproduce.
Running it with other tests in one file can cause delay and not catching the error code.

Created requirements.txt to install libfaketime.
Updated topologies.py for LogCapture.

Relates: https://pagure.io/389-ds-base/issue/50873

Reviewed by: vashirov (Thanks!)

libfaketime is not used in this test module, perhaps this can be removed?

Please use inst_dir from ds_paths here, as some installations are using prefix.

This will not work in FIPS mode, as PBKDF2_SHA256 is not supported there.
In FIPS mode we can check for SSHA512 instead.

This will be needed on Fedora at some point too.

libfaketime is not used in this test module, perhaps this can be removed?

And one more thing regarding libfaketime. If ns-slapd is built with ASAN, instance creation fails when there is pytest-libfaketime present, as it adds LD_PRELOAD which ASAN doesn't like.
So maybe we can skip import of libfaketime when we run on ASAN build?

The rest looks good, thanks!

rebased onto 94ec8908d3e034b61a46cd3ddf2f9b1888b55b0a

@vashirov
Changes done as per suggestions, please review.
health_security_test.py is skipped before import of libfaketime if ASAN is enabled
I had to put additional arg values to FakeArgs (args.list_errors, args.list_checks, args.check, args.dry_run)
that were introduced in https://pagure.io/389-ds-base/issue/50746
Tested on RHEL8.2, 8.3 and Fedora.

On Fedora I have a test failure with 389-ds-base-1.4.3.8-1.fc32.x86_64

FAILED dirsrvtests/tests/suites/healthcheck/healthcheck_test.py::test_healthcheck_backend_missing_mapping_tree - ldap.OPERATIONS_ERROR: {'desc': 'Operations error', 'info...
E         ldap.OPERATIONS_ERROR: {'desc': 'Operations error', 'info': 'Warning: Operation attempted on a disabled node : dc=test,dc=com\n'}                                  

rebased onto fe48b604813f36ce2ca0d148c5f43949f4580c61

@vashirov
Ahh, I accidentally modified the xfail condition.
Disabled suffix issue is not yet fixed. I put it back now.

LGTM, thanks!

Pull-Request has been merged by vashirov

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/4161

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata