You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
assertHostInformation.dir_exists(wazuh_params['master'], WAZUH_ROOT), logger.error(f'The {WAZUH_ROOT} is not present in {HostInformation.get_os_name_and_version_from_inventory(wazuh_params["master"])}')
We should implement it in this way:
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:wazuh-qa/deployability/modules/testing/tests/test_agent/test_install.py
Line 81 in e71e39a
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
The text was updated successfully, but these errors were encountered: