wazuh / wazuh-qa

Wazuh - Quality Assurance
GNU General Public License v2.0
64 stars 30 forks source link

test_reports_file_and_nodiff tests are failing in scheduled and realtime mode #4190

Closed TomasTurina closed 1 year ago

TomasTurina commented 1 year ago

Description

After executing the suite of tests related to FIM (manager tests), the following tests failed:

Scheduled

  collected 1123 items / 460 deselected / 663 selected

  test_fim/test_files/test_ambiguous_confs/test_ambiguous_whodata_thread.py ss                  [  0%]
  test_fim/test_files/test_ambiguous_confs/test_ignore_works_over_restrict.py ..sssss...        [  1%]
  test_fim/test_files/test_ambiguous_confs/test_whodata_prevails_over_realtime.py ss            [  2%]
  test_fim/test_files/test_audit/test_remove_audit.py .                                         [  2%]
  test_fim/test_files/test_basic_usage/test_basic_usage_delete_folder.py ..                     [  2%]
  test_fim/test_files/test_basic_usage/test_basic_usage_disabled.py .                           [  2%]
  test_fim/test_files/test_basic_usage/test_basic_usage_entries_match_path_count.py .           [  2%]
  test_fim/test_files/test_basic_usage/test_basic_usage_move_dir.py ....                        [  3%]
  test_fim/test_files/test_basic_usage/test_basic_usage_move_file.py .....                      [  4%]
  test_fim/test_files/test_basic_usage/test_basic_usage_no_dir.py ..                            [  4%]
  test_fim/test_files/test_basic_usage/test_basic_usage_rename.py ..                            [  4%]
  test_fim/test_files/test_basic_usage/test_basic_usage_starting_agent.py ...                   [  5%]
  test_fim/test_files/test_env_variables/test_dir.py ....                                       [  5%]
  test_fim/test_files/test_env_variables/test_nodiff.py ....                                    [  6%]
  test_fim/test_files/test_file_limit/test_file_limit_capacity_alerts.py ...                    [  6%]
  test_fim/test_files/test_file_limit/test_file_limit_default.py .                              [  7%]
  test_fim/test_files/test_file_limit/test_file_limit_delete_full.py s                          [  7%]
  test_fim/test_files/test_file_limit/test_file_limit_full.py .                                 [  7%]
  test_fim/test_files/test_file_limit/test_file_limit_no_limit.py .                             [  7%]
  test_fim/test_files/test_file_limit/test_file_limit_values.py ..                              [  7%]
  test_fim/test_files/test_follow_symbolic_link/test_audit_rules_removed_after_change_link.py s [  7%]
  test_fim/test_files/test_follow_symbolic_link/test_change_target.py .ss.                      [  8%]
  test_fim/test_files/test_follow_symbolic_link/test_change_target_inside_folder.py .ss.        [  9%]
  test_fim/test_files/test_follow_symbolic_link/test_change_target_with_nested_directory.py .   [  9%]
  test_fim/test_files/test_follow_symbolic_link/test_delete_symlink.py .ss.                     [  9%]
  test_fim/test_files/test_follow_symbolic_link/test_follow_symbolic_disabled.py .ss.           [ 10%]
  test_fim/test_files/test_follow_symbolic_link/test_monitor_symlink.py .ss.                    [ 11%]
  test_fim/test_files/test_follow_symbolic_link/test_not_following_symbolic_link.py ..          [ 11%]
  test_fim/test_files/test_follow_symbolic_link/test_revert_symlink.py .                        [ 11%]
  test_fim/test_files/test_follow_symbolic_link/test_symlink_and_dir.py .                       [ 11%]
  test_fim/test_files/test_follow_symbolic_link/test_symlink_to_dir_between_scans.py .          [ 11%]
  test_fim/test_files/test_ignore/test_ignore_valid.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 58%]
  test_fim/test_files/test_inotify/test_num_watches.py sss.                                     [ 59%]
  test_fim/test_files/test_max_eps/test_max_eps.py s                                            [ 59%]
  test_fim/test_files/test_moving_files/test_moving_files.py ..                                 [ 60%]
  test_fim/test_files/test_prefilter_cmd/test_prefilter_cmd_conf.py .                           [ 60%]
  test_fim/test_files/test_process_priority/test_process_priority.py s                          [ 60%]
  test_fim/test_files/test_recursion_level/test_recursion_level.py ssssssssssssssss             [ 62%]
  test_fim/test_files/test_report_changes/test_diff_size_limit_configured.py .                  [ 62%]
  test_fim/test_files/test_report_changes/test_diff_size_limit_default.py .                     [ 63%]
  test_fim/test_files/test_report_changes/test_disk_quota_default.py .                          [ 63%]
  test_fim/test_files/test_report_changes/test_disk_quota_disabled.py .                         [ 63%]
  test_fim/test_files/test_report_changes/test_file_size_default.py .                           [ 63%]
  test_fim/test_files/test_report_changes/test_file_size_disabled.py .                          [ 63%]
  test_fim/test_files/test_report_changes/test_file_size_values.py ....                         [ 64%]
  test_fim/test_files/test_report_changes/test_large_changes.py sssssss                         [ 65%]
  test_fim/test_files/test_report_changes/test_report_changes_and_diff.py ....EE                [ 66%]
  test_fim/test_files/test_report_changes/test_report_deleted_diff.py ..                        [ 66%]
  test_fim/test_files/test_restrict/test_restrict_valid.py ssssssss....ssssssssssss........ssss..ssssssssssssss....ssss..ssssssssssssss....ssss..ssssssssssssssssssssssssssss......ssssssssssssssssssssssss [ 88%]
  test_fim/test_files/test_scan/test_scan_day.py ...                                            [ 88%]
  test_fim/test_files/test_scan/test_scan_day_and_time.py ....                                  [ 89%]
  test_fim/test_files/test_scan/test_scan_time.py ...                                           [ 89%]
  test_fim/test_files/test_skip/test_skip.py .ss..ss.                                           [ 90%]
  test_fim/test_files/test_tags/test_tags.py ssssssssssssssssssssssssssssssssssssssss           [ 96%]
  test_fim/test_files/test_timezone_changes/test_timezone_changes.py .                          [ 97%]
  test_fim/test_synchronization/test_invalid_sync_response.py ..                                [ 97%]
  test_fim/test_synchronization/test_sync_disabled.py .                                         [ 97%]
  test_fim/test_synchronization/test_sync_interval.py ssssss                                    [ 98%]
  test_fim/test_synchronization/test_sync_overlap.py ........                                   [ 99%]
  test_fim/test_synchronization/test_sync_time.py .                                             [ 99%]
  test_fim/test_synchronization/test_synchronize_integrity_scan.py s                            [100%]

  ================================================ short test summary info ================================================
  ERROR test_fim/test_files/test_report_changes/test_report_changes_and_diff.py::test_reports_file_and_nodiff[report_changes_found_whodata-test_folders0] - TimeoutError: Did not receive "File integrity monitoring ...
  ERROR test_fim/test_files/test_report_changes/test_report_changes_and_diff.py::test_reports_file_and_nodiff[report_changes_truncated_whodata-test_folders0] - TimeoutError: Did not receive "File integrity monitor...
  ============================ 137 passed, 524 skipped, 460 deselected, 2 errors in 1537.74s (0:25:37) ============================

Real-time

  collected 836 items / 188 deselected / 648 selected

  test_fim/test_files/test_ambiguous_confs/test_ambiguous_whodata_thread.py ss                  [  0%]
  test_fim/test_files/test_ambiguous_confs/test_ignore_works_over_restrict.py ..sssss...        [  1%]
  test_fim/test_files/test_ambiguous_confs/test_whodata_prevails_over_realtime.py ss            [  2%]
  test_fim/test_files/test_audit/test_remove_audit.py .                                         [  2%]
  test_fim/test_files/test_basic_usage/test_basic_usage_delete_folder.py ..                     [  2%]
  test_fim/test_files/test_basic_usage/test_basic_usage_disabled.py .                           [  2%]
  test_fim/test_files/test_basic_usage/test_basic_usage_entries_match_path_count.py s           [  2%]
  test_fim/test_files/test_basic_usage/test_basic_usage_move_dir.py ....                        [  3%]
  test_fim/test_files/test_basic_usage/test_basic_usage_move_file.py .....                      [  4%]
  test_fim/test_files/test_basic_usage/test_basic_usage_no_dir.py ..                            [  4%]
  test_fim/test_files/test_basic_usage/test_basic_usage_rename.py ..                            [  4%]
  test_fim/test_files/test_basic_usage/test_basic_usage_starting_agent.py ...                   [  5%]
  test_fim/test_files/test_env_variables/test_dir.py ....                                       [  6%]
  test_fim/test_files/test_env_variables/test_nodiff.py ....                                    [  6%]
  test_fim/test_files/test_file_limit/test_file_limit_capacity_alerts.py sss                    [  7%]
  test_fim/test_files/test_file_limit/test_file_limit_default.py .                              [  7%]
  test_fim/test_files/test_file_limit/test_file_limit_delete_full.py .                          [  7%]
  test_fim/test_files/test_file_limit/test_file_limit_full.py .                                 [  7%]
  test_fim/test_files/test_file_limit/test_file_limit_no_limit.py .                             [  7%]
  test_fim/test_files/test_file_limit/test_file_limit_values.py ..                              [  8%]
  test_fim/test_files/test_follow_symbolic_link/test_audit_rules_removed_after_change_link.py s [  8%]
  test_fim/test_files/test_follow_symbolic_link/test_change_target.py .ss.                      [  8%]
  test_fim/test_files/test_follow_symbolic_link/test_change_target_inside_folder.py .ss.        [  9%]
  test_fim/test_files/test_follow_symbolic_link/test_change_target_with_nested_directory.py s   [  9%]
  test_fim/test_files/test_follow_symbolic_link/test_delete_symlink.py .ss.                     [ 10%]
  test_fim/test_files/test_follow_symbolic_link/test_follow_symbolic_disabled.py .ss.           [ 10%]
  test_fim/test_files/test_follow_symbolic_link/test_monitor_symlink.py .ss.                    [ 11%]
  test_fim/test_files/test_follow_symbolic_link/test_not_following_symbolic_link.py ..          [ 11%]
  test_fim/test_files/test_follow_symbolic_link/test_revert_symlink.py .                        [ 11%]
  test_fim/test_files/test_follow_symbolic_link/test_symlink_and_dir.py .                       [ 12%]
  test_fim/test_files/test_follow_symbolic_link/test_symlink_to_dir_between_scans.py s          [ 12%]
  test_fim/test_files/test_ignore/test_ignore_valid.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 60%]
  test_fim/test_files/test_inotify/test_num_watches.py ...s                                     [ 60%]
  test_fim/test_files/test_max_eps/test_max_eps.py ss                                           [ 61%]
  test_fim/test_files/test_moving_files/test_moving_files.py ..                                 [ 61%]
  test_fim/test_files/test_prefilter_cmd/test_prefilter_cmd_conf.py .                           [ 61%]
  test_fim/test_files/test_process_priority/test_process_priority.py ...                        [ 62%]
  test_fim/test_files/test_recursion_level/test_recursion_level.py ssssssssssssssss             [ 64%]
  test_fim/test_files/test_report_changes/test_diff_size_limit_configured.py .                  [ 64%]
  test_fim/test_files/test_report_changes/test_diff_size_limit_default.py .                     [ 64%]
  test_fim/test_files/test_report_changes/test_disk_quota_default.py .                          [ 65%]
  test_fim/test_files/test_report_changes/test_disk_quota_disabled.py .                         [ 65%]
  test_fim/test_files/test_report_changes/test_file_size_default.py .                           [ 65%]
  test_fim/test_files/test_report_changes/test_file_size_disabled.py .                          [ 65%]
  test_fim/test_files/test_report_changes/test_file_size_values.py ....                         [ 66%]
  test_fim/test_files/test_report_changes/test_large_changes.py sssssss                         [ 67%]
  test_fim/test_files/test_report_changes/test_report_changes_and_diff.py ....EE                [ 68%]
  test_fim/test_files/test_report_changes/test_report_deleted_diff.py ..                        [ 68%]
  test_fim/test_files/test_restrict/test_restrict_valid.py ssssssss....ssssssssssss........ssss..ssssssssssssss....ssss..ssssssssssssss....ssss..ssssssssssssssssssssssssssss......ssssssssssssssssssssssss [ 90%]
  test_fim/test_files/test_scan/test_scan_day.py s                                              [ 90%]
  test_fim/test_files/test_scan/test_scan_day_and_time.py s                                     [ 91%]
  test_fim/test_files/test_scan/test_scan_time.py s                                             [ 91%]
  test_fim/test_files/test_skip/test_skip.py ss                                                 [ 91%]
  test_fim/test_files/test_tags/test_tags.py ssssssssssssssssssssssssssssssssssssssss           [ 97%]
  test_fim/test_files/test_timezone_changes/test_timezone_changes.py s                          [ 97%]
  test_fim/test_synchronization/test_invalid_sync_response.py ..                                [ 98%]
  test_fim/test_synchronization/test_sync_disabled.py .                                         [ 98%]
  test_fim/test_synchronization/test_sync_interval.py s                                         [ 98%]
  test_fim/test_synchronization/test_sync_overlap.py ........                                   [ 99%]
  test_fim/test_synchronization/test_sync_time.py .                                             [ 99%]
  test_fim/test_synchronization/test_synchronize_integrity_scan.py .                            [100%]

  ================================================ short test summary info ================================================
  ERROR test_fim/test_files/test_report_changes/test_report_changes_and_diff.py::test_reports_file_and_nodiff[report_changes_found_whodata-test_folders0] - TimeoutError: Did not receive "File integrity monitoring ...
  ERROR test_fim/test_files/test_report_changes/test_report_changes_and_diff.py::test_reports_file_and_nodiff[report_changes_truncated_whodata-test_folders0] - TimeoutError: Did not receive "File integrity monitor...
  ============================ 123 passed, 523 skipped, 188 deselected, 2 errors in 1306.46s (0:21:46) ============================

These tests need to be reviewed and fixed.

Deblintrake09 commented 1 year ago

Update 02/06/2023

During testing, replicating the described fail was not possible. The reports below show tests do not fail in all three modes.

Execution type result modes notes
Manager Jenkins 🟢 realtime + whodata Cannot run tests in scheduled mode in Jenkins
Manager local 🟢 all 3 modes

However, it was found that the failing cases are in whodata mode, when tests were launched in realtime or scheduled. This is caused because the fix for get_test_cases_data was not applied to master. It is being tracked in #4184

|