The assertions of the Module's tests call the logger.error method instead of returning an error message. This method returns None. The current implementation generates all the AssertionError exception messages as None. For example, this code:
assert HostInformation.dir_exists(wazuh_params['master'], WAZUH_ROOT), f'The {WAZUH_ROOT} is not present in {HostInformation.get_os_name_and_version_from_inventory(wazuh_params["master"])}'
The other important point is whether the assertion should send the errors to the log file because Pytest sends the AssertionError exception to the final report.
Description
The assertions of the Module's tests call the
logger.error
method instead of returning an error message. This method returnsNone
. The current implementation generates all theAssertionError
exception messages asNone
. For example, this code:https://github.com/wazuh/wazuh-qa/blob/e71e39aea2caeb0dceab9645fe4f9343152a8a83/deployability/modules/testing/tests/test_agent/test_install.py#L81
We should implement it in this way:
The other important point is whether the assertion should send the errors to the log file because
Pytest
sends the AssertionError exception to the final report.Related PR comment: comment