diff --git a/.gitignore b/.gitignore index a42bfce12d..102bc57ac6 100644 --- a/.gitignore +++ b/.gitignore @@ -59,6 +59,5 @@ deps/wazuh_testing/wazuh_testing.egg-info/ # SearchUI package-lock deps/wazuh_testing/wazuh_testing/qa_docs/Search-UI/package-lock.json - # GCP tests configuration file tests/integration/test_gcloud/data/configuration.yaml diff --git a/deps/wazuh_testing/wazuh_testing/gcloud.py b/deps/wazuh_testing/wazuh_testing/gcloud.py index 4b8023415c..1722848b62 100644 --- a/deps/wazuh_testing/wazuh_testing/gcloud.py +++ b/deps/wazuh_testing/wazuh_testing/gcloud.py @@ -27,19 +27,19 @@ def validate_gcp_event(event): def callback_detect_start_gcp(line): - if 'wm_gcp_main(): INFO: Module started.' in line: + if 'wm_gcp_pubsub_main(): INFO: Module started.' in line: return line return None def callback_detect_start_fetching_logs(line): - if 'wm_gcp_main(): DEBUG: Starting fetching of logs.' in line: + if 'wm_gcp_pubsub_main(): DEBUG: Starting fetching of logs.' in line: return line return None def callback_detect_start_gcp_sleep(line): - match = re.match(r'.*wm_gcp_main\(\): DEBUG: Sleeping until: (\S+ \S+)', line) + match = re.match(r'.*wm_gcp_pubsub_main\(\): DEBUG: Sleeping until: (\S+ \S+)', line) if match: return match.group(1) @@ -56,7 +56,7 @@ def detect_gcp_start(file_monitor): def callback_received_messages_number(line): - match = re.match(r'.*wm_gcp_run\(\): INFO: - INFO - Received and acknowledged (\d+) messages', line) + match = re.match(r'.*wm_gcp_pubsub_run\(\): INFO: - INFO - Received and acknowledged (\d+) messages', line) if match: return match.group(1) return None @@ -95,8 +95,8 @@ def callback_detect_schedule_validate_parameters_err(line): def callback_detect_gcp_read_err(line): - match_err = re.match(r'.*wm_gcp_read\(\): ERROR:.*', line) - match_warn = re.match(r'.*wm_gcp_read\(\): WARNING: File \'\S+\' not found.*', line) + match_err = re.match(r'.*wm_gcp_pubsub_read\(\): ERROR:.*', line) + match_warn = re.match(r'.*wm_gcp_pubsub_read\(\): WARNING: File \'\S+\' not found.*', line) if match_err: return line @@ -107,7 +107,7 @@ def callback_detect_gcp_read_err(line): def callback_detect_gcp_wmodule_err(line): match_err = re.match(r'.*read_main_elements\(\): ERROR: \(\d+\): Invalid element in the configuration.*', line) - match_deb = re.match(r'.*Read_GCP\(\): DEBUG: Empty configuration for module \'gcp-pubsub\'', line) + match_deb = re.match(r'.*Read_GCP_pubsub\(\): DEBUG: Empty configuration for module \'gcp-pubsub\'', line) if match_err: return line diff --git a/deps/wazuh_testing/wazuh_testing/qa_docs/schema.yaml b/deps/wazuh_testing/wazuh_testing/qa_docs/schema.yaml index d5e7cfcc80..b8ffc97ca6 100644 --- a/deps/wazuh_testing/wazuh_testing/qa_docs/schema.yaml +++ b/deps/wazuh_testing/wazuh_testing/qa_docs/schema.yaml @@ -186,6 +186,8 @@ predefined_values: - brute_force_attack - cache - cluster + - config + - config - cors - cpe - dos_attack @@ -214,49 +216,59 @@ predefined_values: - fim_multiple_dirs - fim_nodiff - fim_prefilter_cmd - - fim_report_changes - fim_process_priority - fim_recursion_level - - fim_restrict - - fim_scan - - fim_skip - - fim_stats_integrity_sync - - fim_tags - - fim_timezone_changes - - fim_wildcards_complex - - fim_windows_audit_interval - fim_registry_ambiguous_confs - fim_registry_basic_usage - fim_registry_checks - - fim_registry_ignore - - fim_registry_nodiff - fim_registry_file_limit + - fim_registry_ignore - fim_registry_multiple_registries + - fim_registry_nodiff - fim_registry_recursion_level - fim_registry_restrict + - fim_report_changes + - fim_restrict + - fim_scan + - fim_skip + - fim_stats_integrity_sync - fim_synchronization + - fim_tags + - fim_timezone_changes + - fim_wildcards_complex + - fim_windows_audit_interval - gcloud - github - integrity + - interval + - invalid - keys - key_polling + - limits - logcollector + - logging + - logs - logs - logtest - man_in_the_middle - master + - maximum - mitre - msu - nvd - office365 + - on start - oval + - pull - rbac - realtime + - remote - remoted - rids - rootcheck - rules - scan + - schedule - scheduled - settings - simulator @@ -268,6 +280,7 @@ predefined_values: - vulnerability_detector - wazuh_db - wdb_socket + - week_day - who_data - worker - wpk \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml deleted file mode 100644 index 956fbf7b5f..0000000000 --- a/mkdocs.yml +++ /dev/null @@ -1,558 +0,0 @@ -site_name: Wazuh-QA Documentation -theme: - name: "material" - palette: - primary: light blue - logo: assets/wazuh_logo_w.png - features: - - navigation.indexes - - navigation.tabs - - navigation.tabs.sticky -plugins: - - search - - mkdocstrings -extra_css: - - stylesheets/logo.css - -# Repository -repo_name: wazuh/wazuh-qa -repo_url: https://github.com/wazuh/wazuh-qa -edit_uri: "" -nav: - - Home: index.md - - Deps: - - Dependencies: deps/index.md - - Wazuh Testing: - - Wazuh Testing: deps/wazuh-testing/wazuh_testing.md - - Tools: deps/wazuh-testing/tools.md - - Tests: - - tests/index.md - - Integration: - - tests/integration/index.md - - Integration tests structure: tests/integration/help.md - - Setting up a test environment: tests/integration/setting_up_test_environment.md - - Vulnerability Detector: - - tests/integration/test_vulnerability_detector/index.md - - Tests feeds: - - tests/integration/test_vulnerability_detector/test_feeds/index.md - - Amazon Linux: - - Test extra tags alas feed: tests/integration/test_vulnerability_detector/test_feeds/alas/test_extra_tags_alas_feed.md - - Test invalid syntax alas feed: tests/integration/test_vulnerability_detector/test_feeds/alas/test_invalid_syntax_alas_feed.md - - Test invalid values alas feed: tests/integration/test_vulnerability_detector/test_feeds/alas/test_invalid_values_alas_feed.md - - Test missing tags alas feed: tests/integration/test_vulnerability_detector/test_feeds/alas/test_missing_tags_alas_feed.md - - Debian: - - Test extra tags debian feed: tests/integration/test_vulnerability_detector/test_feeds/debian/test_extra_tags_debian_feed.md - - Test invalid syntax debian feed: tests/integration/test_vulnerability_detector/test_feeds/debian/test_invalid_syntax_debian_feed.md - - Test invalid values debian feed: tests/integration/test_vulnerability_detector/test_feeds/debian/test_invalid_values_debian_feed.md - - Test missing tags debian feed: tests/integration/test_vulnerability_detector/test_feeds/debian/test_missing_tags_debian_feed.md - - RedHat: - - Test extra fields redhat feed: tests/integration/test_vulnerability_detector/test_feeds/redhat/test_extra_fields_redhat_feed.md - - Test invalid syntax redhat feed: tests/integration/test_vulnerability_detector/test_feeds/redhat/test_invalid_syntax_redhat_feed.md - - Test invalid values redhat feed: tests/integration/test_vulnerability_detector/test_feeds/redhat/test_invalid_values_redhat_feed.md - - Test missing fileds redhat feed: tests/integration/test_vulnerability_detector/test_feeds/redhat/test_missing_fields_redhat_feed.md - - Archlinux: - - Test extra fields archlinux feed: tests/integration/test_vulnerability_detector/test_feeds/archlinux/test_extra_tags_archlinux_feed.md - - Test invalid syntax archlinux feed: tests/integration/test_vulnerability_detector/test_feeds/archlinux/test_invalid_syntax_archlinux_feed.md - - Test invalid values archlinux feed: tests/integration/test_vulnerability_detector/test_feeds/archlinux/test_invalid_values_archlinux_feed.md - - Test missing fileds archlinux feed: tests/integration/test_vulnerability_detector/test_feeds/archlinux/test_missing_tags_archlinux_feed.md - - MSU: - - Test extra fields feed: tests/integration/test_vulnerability_detector/test_feeds/msu/test_extra_fields_msu_feed.md - - Test invalid syntax msu feed: tests/integration/test_vulnerability_detector/test_feeds/msu/test_invalid_syntax_msu_feed.md - - Test invalid values msu feed: tests/integration/test_vulnerability_detector/test_feeds/msu/test_invalid_values_msu_feed.md - - Test missing fields msu feed: tests/integration/test_vulnerability_detector/test_feeds/msu/test_missing_fields_msu_feed.md - - Canonical: - - Test missing tags canonical feed: tests/integration/test_vulnerability_detector/test_feeds/canonical/test_missing_tags_canonical_feed.md - - Test invalid values canonical feed: tests/integration/test_vulnerability_detector/test_feeds/canonical/test_invalid_values_canonical_feed.md - - Test invalid syntax canonical feed: tests/integration/test_vulnerability_detector/test_feeds/canonical/test_invalid_syntax_canonical_feed.md - - Test extra tags canonical feed: tests/integration/test_vulnerability_detector/test_feeds/canonical/test_extra_tags_canonical_feed.md - - Test download feeds: tests/integration/test_vulnerability_detector/test_feeds/test_download_feeds.md - - Test invalid type custom feeds: tests/integration/test_vulnerability_detector/test_feeds/test_invalid_type_custom_feeds.md - - Test invalid type url feeds: tests/integration/test_vulnerability_detector/test_feeds/test_invalid_type_url_feeds.md - - Test validate feed content: tests/integration/test_vulnerability_detector/test_feeds/test_validate_feed_content.md - - Tests general settings: - - tests/integration/test_vulnerability_detector/test_general_settings/index.md - - Test general settings enabled: tests/integration/test_vulnerability_detector/test_general_settings/test_general_settings_enabled.md - - Test general settings ignore time: tests/integration/test_vulnerability_detector/test_general_settings/test_general_settings_ignore_time.md - - Test general settings intervals: tests/integration/test_vulnerability_detector/test_general_settings/test_general_settings_interval.md - - Test general settings run on start: tests/integration/test_vulnerability_detector/test_general_settings/test_general_settings_run_on_start.md - - Tests providers: - - tests/integration/test_vulnerability_detector/test_providers/index.md - - Test providers enabled: tests/integration/test_vulnerability_detector/test_providers/test_providers_enabled.md - - Test providers update intervals: tests/integration/test_vulnerability_detector/test_providers/test_providers_update_interval.md - - Update from year: tests/integration/test_vulnerability_detector/test_providers/test_providers_update_from_year.md - - Test providers OS: tests/integration/test_vulnerability_detector/test_providers/test_providers_os.md - - Test providers no OS: tests/integration/test_vulnerability_detector/test_providers/test_providers_no_os.md - - Test providers multiple providers: tests/integration/test_vulnerability_detector/test_providers/test_providers_multiple_providers.md - - Tests SCAN results: - - tests/integration/test_vulnerability_detector/test_scan_results/index.md - - Test alas inventory with alas feed: tests/integration/test_vulnerability_detector/test_scan_results/test_alas_inventory_alas_feed.md - - Test debian inventory with debian feed: tests/integration/test_vulnerability_detector/test_scan_results/test_debian_inventory_debian_feed.md - - Test macos inventory: tests/integration/test_vulnerability_detector/test_scan_results/test_macos_inventory.md - - Test msu inventory with msu feed: tests/integration/test_vulnerability_detector/test_scan_results/test_msu_inventory_msu_feed.md - - Test redhat inventory with redhat feed: tests/integration/test_vulnerability_detector/test_scan_results/test_redhat_inventory_redhat_feed.md - - Test ubuntu inventory with canonical feed: tests/integration/test_vulnerability_detector/test_scan_results/test_ubuntu_inventory_canonical_feed.md - - Test scan different cves: tests/integration/test_vulnerability_detector/test_scan_results/test_scan_different_cves.md - - Test scan nvd feed: tests/integration/test_vulnerability_detector/test_scan_results/test_scan_nvd_feed.md - - Test scan providers and nvd feed: tests/integration/test_vulnerability_detector/test_scan_results/test_scan_providers_and_nvd_feed.md - - Tests Windows: - - tests/integration/test_vulnerability_detector/test_windows/index.md - - Test CPE indexing: tests/integration/test_vulnerability_detector/test_windows/test_cpe_indexing.md - - Active response: - - tests/integration/test_active_response/index.md - - Test analysisd: - - tests/integration/test_active_response/test_analysisd/index.md - - Test OS exec: tests/integration/test_active_response/test_analysisd/test_os_exec.md - - Test execd: - - tests/integration/test_active_response/test_execd/index.md - - Test execd restart: tests/integration/test_active_response/test_execd/test_execd_restart.md - - Test execd firewall drop: tests/integration/test_active_response/test_execd/test_execd_firewall_drop.md - - Agentd: - - tests/integration/test_agentd/index.md - - Test agentd reconnection: tests/integration/test_agentd/test_agentd_reconnection.md - - Test agentd parametrized reconnection: tests/integration/test_agentd/test_agentd_parametrized_reconnections.md - - Test agentd multi server: tests/integration/test_agentd/test_agentd_multi_server.md - - Test agentd enrollment param: tests/integration/test_agentd/test_agentd_enrollment_params.md - - Test agentd auth enrollment: tests/integration/test_agentd/test_agent_auth_enrollment.md - - Analysisd: - - tests/integration/test_analysisd/index.md - - Test integrity messages: tests/integration/test_analysisd/test_integrity_messages/test_integrity_messages.md - - Test event messages: tests/integration/test_analysisd/test_event_messages/test_event_messages.md - - Test error messages: tests/integration/test_analysisd/test_error_messages/test_error_messages.md - - Test all syscheckd configurations: - - tests/integration/test_analysisd/test_all_syscheckd_configurations/index.md - - Test validate win32 analysisd registry alerts: tests/integration/test_analysisd/test_all_syscheckd_configurations/test_validate_win32_analysisd_registry_alerts.md - - Test validate win32 analysisd alerts: tests/integration/test_analysisd/test_all_syscheckd_configurations/test_validate_win32_analysisd_alerts.md - - Test validate rare analysisd alerts: tests/integration/test_analysisd/test_all_syscheckd_configurations/test_validate_rare_analysisd_alerts.md - - Test validate linux analysisd alerts: tests/integration/test_analysisd/test_all_syscheckd_configurations/test_validate_linux_analysisd_alerts.md - - Test check socket responses: tests/integration/test_analysisd/test_all_syscheckd_configurations/test_check_socket_responses.md - - Test check rare socket_responses: tests/integration/test_analysisd/test_all_syscheckd_configurations/test_check_rare_socket_responses.md - - Test mitre: tests/integration/test_analysisd/test_mitre/test_mitre_check_alert.md - - Test scan messages: tests/integration/test_analysisd/test_scan_messages/test_scan_messages.md - - API: - - tests/integration/test_api/index.md - - Test config: - - tests/integration/test_api/test_config/index.md - - Test behind proxy server: tests/integration/test_api/test_config/test_behind_proxy_server/test_behind_proxy_server.md - - Test bruteforce blocking system: tests/integration/test_api/test_config/test_bruteforce_blocking_system/test_bruteforce_blocking_system.md - - Test cache: tests/integration/test_api/test_config/test_cache/test_cache.md - - Test cors: tests/integration/test_api/test_config/test_cors/test_cors.md - - Test DOS blocking system: tests/integration/test_api/test_config/test_DOS_blocking_system/test_DOS_blocking_system.md - - Test drop privileges: tests/integration/test_api/test_config/test_drop_privileges/test_drop_privileges.md - - Test experimental features: tests/integration/test_api/test_config/test_experimental_features/test_experimental_features.md - - Test host port: tests/integration/test_api/test_config/test_host_port/test_host_port.md - - Test https: tests/integration/test_api/test_config/test_https/test_https.md - - Test jwt token exp timeout: tests/integration/test_api/test_config/test_jwt_token_exp_timeout/test_jwt_token_exp_timeout.md - - Test logs: tests/integration/test_api/test_config/test_logs/test_logs.md - - Test max upload size: tests/integration/test_api/test_config/test_max_upload_size/test_max_upload_size.md - - Test rbac: tests/integration/test_api/test_config/test_rbac/test_rbac.md - - Test RBAC: - - tests/integration/test_api/test_rbac/index.md - - Test add old resource: tests/integration/test_api/test_rbac/test_add_old_resource.md - - Test admin resources: tests/integration/test_api/test_rbac/test_admin_resources.md - - Test policy position: tests/integration/test_api/test_rbac/test_policy_position.md - - Test remove relationship: tests/integration/test_api/test_rbac/test_remove_relationship.md - - Test remove resource: tests/integration/test_api/test_rbac/test_remove_resource.md - - Authd: - - tests/integration/test_authd/index.md - - Test authd: tests/integration/test_authd/test_authd.md - - Test authd worker: tests/integration/test_authd/test_authd_worker.md - - Test authd ssl options: tests/integration/test_authd/test_authd_ssl_options.md - - Test authd ssl certs: tests/integration/test_authd/test_authd_ssl_certs.md - - Test authd name ip pass: tests/integration/test_authd/test_authd_name_ip_pass.md - - Test authd local: tests/integration/test_authd/test_authd_local.md - - Test authd agents ctx: tests/integration/test_authd/test_authd_agents_ctx.md - - Test authd remote enrollment enabled: tests/integration/test_authd/test_remote_enrollment.md - - FIM: - - tests/integration/test_fim/index.md - - Test files: - - tests/integration/test_fim/test_files/index.md - - Test ambiguous conf: - - tests/integration/test_fim/test_files/test_ambiguous_confs/index.md - - Test ambiguous complex: tests/integration/test_fim/test_files/test_ambiguous_confs/test_ambiguous_complex.md - - Test ambiguous simple: tests/integration/test_fim/test_files/test_ambiguous_confs/test_ambiguous_simple.md - - Test ambiguous whodata thread: tests/integration/test_fim/test_files/test_ambiguous_confs/test_ambiguous_whodata_thread.md - - Test duplicate entries: tests/integration/test_fim/test_files/test_ambiguous_confs/test_duplicate_entries.md - - Test ignore works over restrict: tests/integration/test_fim/test_files/test_ambiguous_confs/test_ignore_works_over_restrict.md - - Test whodata prevails over realtime: tests/integration/test_fim/test_files/test_ambiguous_confs/test_whodata_prevails_over_realtime.md - - Test audit: - - tests/integration/test_fim/test_files/test_audit/index.md - - tests/integration/test_fim/test_files/test_audit/test_audit_after_initial_scan.md - - tests/integration/test_fim/test_files/test_audit/test_audit_no_dir.md - - tests/integration/test_fim/test_files/test_audit/test_audit.md - - tests/integration/test_fim/test_files/test_audit/test_remove_audit.md - - tests/integration/test_fim/test_files/test_audit/test_remove_rule_five_times.md - - Test basic usage: - - tests/integration/test_fim/test_files/test_basic_usage/index.md - - Test basic usage baseline generation: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_baseline_generation.md - - Test basic usage changes: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_changes.md - - Test basic usage db inode check: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_db_inode_check.md - - Test basic usage create after delete dir: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_create_after_delete_dir.md - - Test basic usage create rt wd: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_create_rt_wd.md - - Test basic usage create scheduled: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_create_scheduled.md - - Test basic usage delete folder: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_delete_folder.md - - Test basic usage dir with commas: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_dir_with_commas.md - - Test basic usage disabled: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_disabled.md - - Test basic usage entries match patch count: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_entries_match_path_count.md - - Test basic usage move dir: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_move_dir.md - - Test basic usage move file: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_move_file.md - - Test basic usage new dirs: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_new_dirs.md - - Test basic usage no dir: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_no_dir.md - - Test basic usage quick changes: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_quick_changes.md - - Test basic usage rename: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_rename.md - - Test basic usage starting agent: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_starting_agent.md - - Test basic usage wildcards: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_wildcards.md - - Test basic usage wildcards runtime: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_wildcards_runtime.md - - Test basic usage realtime unsupported: tests/integration/test_fim/test_files/test_basic_usage/test_basic_usage_realtime_unsupported.md - - Test benchmark: - - tests/integration/test_fim/test_files/test_benchmark/index.md - - Test benchmark: tests/integration/test_fim/test_files/test_benchmark/test_benchmark.md - - Test report changes big: tests/integration/test_fim/test_files/test_benchmark/test_report_changes_big.md - - Test checks: - - tests/integration/test_fim/test_files/test_checks/index.md - - Test check all: tests/integration/test_fim/test_files/test_checks/test_check_all.md - - Test check other: tests/integration/test_fim/test_files/test_checks/test_check_others.md - - Test checksums: tests/integration/test_fim/test_files/test_checks/test_checksums.md - - Test env variables: - - tests/integration/test_fim/test_files/test_env_variables/index.md - - Test dir win32: tests/integration/test_fim/test_files/test_env_variables/test_dir_win32.md - - Test dir: tests/integration/test_fim/test_files/test_env_variables/test_dir.md - - Test ignore: tests/integration/test_fim/test_files/test_env_variables/test_ignore.md - - Test nodiff: tests/integration/test_fim/test_files/test_env_variables/test_nodiff.md - - Test file limit: - - tests/integration/test_fim/test_files/test_file_limit/index.md - - Test file limit capacity alerts: tests/integration/test_fim/test_files/test_file_limit/test_file_limit_capacity_alerts.md - - Test file limit default: tests/integration/test_fim/test_files/test_file_limit/test_file_limit_default.md - - Test file limit delete full: tests/integration/test_fim/test_files/test_file_limit/test_file_limit_delete_full.md - - Test file limit full: tests/integration/test_fim/test_files/test_file_limit/test_file_limit_full.md - - Test file limit no limit: tests/integration/test_fim/test_files/test_file_limit/test_file_limit_no_limit.md - - Test file limit values: tests/integration/test_fim/test_files/test_file_limit/test_file_limit_values.md - - Test follow symbolic link: - - tests/integration/test_fim/test_files/test_follow_symbolic_link/index.md - - Test audit rules removed after link update: tests/integration/test_fim/test_files/test_follow_symbolic_link/test_audit_rules_removed_after_change_link.md - - Test change target inside folder: tests/integration/test_fim/test_files/test_follow_symbolic_link/test_change_target_inside_folder.md - - Test change target with nested directory: tests/integration/test_fim/test_files/test_follow_symbolic_link/test_change_target_with_nested_directory.md - - Test change target: tests/integration/test_fim/test_files/test_follow_symbolic_link/test_change_target.md - - Test delete symlink: tests/integration/test_fim/test_files/test_follow_symbolic_link/test_delete_symlink.md - - Test delete target: tests/integration/test_fim/test_files/test_follow_symbolic_link/test_delete_target.md - - Test follow symbolic link: tests/integration/test_fim/test_files/test_follow_symbolic_link/test_follow_symbolic_disabled.md - - Test monitor symlink: tests/integration/test_fim/test_files/test_follow_symbolic_link/test_monitor_symlink.md - - Test not following symbolic link: tests/integration/test_fim/test_files/test_follow_symbolic_link/test_not_following_symbolic_link.md - - Test revert symlink: tests/integration/test_fim/test_files/test_follow_symbolic_link/test_revert_symlink.md - - Test symlink and dir: tests/integration/test_fim/test_files/test_follow_symbolic_link/test_symlink_and_dir.md - - Test symlink dir inside monitored dir: tests/integration/test_fim/test_files/test_follow_symbolic_link/test_symlink_dir_inside_monitored_dir.md - - Test symlink to dir between scans: tests/integration/test_fim/test_files/test_follow_symbolic_link/test_symlink_to_dir_between_scans.md - - Test symlink within dir: tests/integration/test_fim/test_files/test_follow_symbolic_link/test_symlink_within_dir.md - - Test ignore: - - tests/integration/test_fim/test_files/test_ignore/index.md - - Test file limit capacity alerts: tests/integration/test_fim/test_files/test_ignore/test_file_limit/test_file_limit_capacity_alerts.md - - Test file limit default: tests/integration/test_fim/test_files/test_ignore/test_file_limit/test_file_limit_default.md - - Test file limit delete full: tests/integration/test_fim/test_files/test_ignore/test_file_limit/test_file_limit_delete_full.md - - Test file limit full: tests/integration/test_fim/test_files/test_ignore/test_file_limit/test_file_limit_full.md - - Test file limit no limit: tests/integration/test_fim/test_files/test_ignore/test_file_limit/test_file_limit_no_limit.md - - Test file limit values: tests/integration/test_fim/test_files/test_ignore/test_file_limit/test_file_limit_values.md - - Test inotify: - - tests/integration/test_fim/test_files/test_inotify/index.md - - Test num watches: tests/integration/test_fim/test_files/test_inotify/test_num_watches.md - - Test remove rename folder: tests/integration/test_fim/test_files/test_inotify/test_remove_rename_folder.md - - Test max fd win rt: tests/integration/test_fim/test_files/test_inotify/test_max_fd_rt.md - - Test invalid: - - tests/integration/test_fim/test_files/test_invalid/index.md - - Test invalid: tests/integration/test_fim/test_files/test_invalid/test_invalid.md - - Test max eps: - - tests/integration/test_fim/test_files/test_max_eps/index.md - - Test max eps synchronization: tests/integration/test_fim/test_files/test_max_eps/test_max_eps_synchronization.md - - Test max eps: tests/integration/test_fim/test_files/test_max_eps/test_max_eps.md - - Test max files per second: - - tests/integration/test_fim/test_files/test_max_files_per_second/test_max_files_per_second.md - - Test multiple dirs: - - tests/integration/test_fim/test_files/test_multiple_dirs/index.md - - Test multiple dirs: tests/integration/test_fim/test_files/test_multiple_dirs/test_multiple_dirs.md - - Test multiple entries: tests/integration/test_fim/test_files/test_multiple_dirs/test_multiple_entries.md - - Test moving files: - - tests/integration/test_fim/test_files/test_moving_files/index.md - - Test moving files: tests/integration/test_fim/test_files/test_moving_files/test_moving_files.md - - Test nodiff: - - tests/integration/test_fim/test_files/test_nodiff/index.md - - Test no diff valid: tests/integration/test_fim/test_files/test_nodiff/test_no_diff_valid.md - - Test prefilter cmd: - - tests/integration/test_fim/test_files/test_prefilter_cmd/index.md - - Test prefilter cmd: tests/integration/test_fim/test_files/test_prefilter_cmd/test_prefilter_cmd.md - - Test process priority: - - tests/integration/test_fim/test_files/test_process_priority/index.md - - Test process priority: tests/integration/test_fim/test_files/test_process_priority/test_process_priority.md - - Test recursion level: - - tests/integration/test_fim/test_files/test_recursion_level/index.md - - Test recursion level: tests/integration/test_fim/test_files/test_recursion_level/test_recursion_level.md - - Test report changes: - - tests/integration/test_fim/test_files/test_report_changes/index.md - - Test diff size limit configured: tests/integration/test_fim/test_files/test_report_changes/test_diff_size_limit_configured.md - - Test diff size limit default: tests/integration/test_fim/test_files/test_report_changes/test_diff_size_limit_default.md - - Test diff quota default: tests/integration/test_fim/test_files/test_report_changes/test_disk_quota_default.md - - Test disk quota disabled: tests/integration/test_fim/test_files/test_report_changes/test_disk_quota_disabled.md - - Test disk quota values: tests/integration/test_fim/test_files/test_report_changes/test_disk_quota_values.md - - Test file size default: tests/integration/test_fim/test_files/test_report_changes/test_file_size_default.md - - Test file size disabled: tests/integration/test_fim/test_files/test_report_changes/test_file_size_disabled.md - - Test file size values: tests/integration/test_fim/test_files/test_report_changes/test_file_size_values.md - - Test large changes: tests/integration/test_fim/test_files/test_report_changes/test_large_changes.md - - Test report changes and diff: tests/integration/test_fim/test_files/test_report_changes/test_report_changes_and_diff.md - - Test report deleted diff: tests/integration/test_fim/test_files/test_report_changes/test_report_deleted_diff.md - - Test restrict: - - tests/integration/test_fim/test_files/test_restrict/index.md - - Test restrict valid: tests/integration/test_fim/test_files/test_restrict/test_restrict_valid.md - - Test scan: - - tests/integration/test_fim/test_files/test_scan/index.md - - Test scan day and time: tests/integration/test_fim/test_files/test_scan/test_scan_day_and_time.md - - Test scan day: tests/integration/test_fim/test_files/test_scan/test_scan_day.md - - Test scan time: tests/integration/test_fim/test_files/test_scan/test_scan_time.md - - Test skip: - - tests/integration/test_fim/test_files/test_skip/index.md - - Test skip: tests/integration/test_fim/test_files/test_skip/test_skip.md - - Test stats integrity sync: - - tests/integration/test_fim/test_files/test_stats_integrity_sync/index.md - - Test FIM performance: tests/integration/test_fim/test_files/test_stats_integrity_sync/test_FIM_performance.md - - Test stats integrity sync: tests/integration/test_fim/test_files/test_stats_integrity_sync/test_stats_integrity_sync.md - - Test tags: - - tests/integration/test_fim/test_files/test_tags/index.md - - Test tags: tests/integration/test_fim/test_files/test_tags/test_tags.md - - Test timezone changes: - - tests/integration/test_fim/test_files/test_timezone_changes/index.md - - Test timezone changes: tests/integration/test_fim/test_files/test_timezone_changes/test_timezone_changes.md - - Test windows audit interval: - - tests/integration/test_fim/test_files/test_windows_audit_interval/index.md - - Manage acl: tests/integration/test_fim/test_files/test_windows_audit_interval/manage_acl.md - - Test windows audit interval: tests/integration/test_fim/test_files/test_windows_audit_interval/test_windows_audit_interval.md - - Test wildcards complex: - - tests/integration/test_fim/test_files/test_wildcards_complex/index.md - - Test wildcards complex: tests/integration/test_fim/test_files/test_wildcards_complex/test_wildcards_complex.md - - Test wildcards complex runtime: tests/integration/test_fim/test_files/test_wildcards_complex/test_wildcards_complex_runtime.md - - Test registry: - - tests/integration/test_fim/test_registry/index.md - - Test registry ambiguous confs: - - tests/integration/test_fim/test_registry/test_registry_ambiguous_confs/index.md - - Test registry ambiguous simple: tests/integration/test_fim/test_registry/test_registry_ambiguous_confs/test_registry_ambiguous_simple.md - - Test registry ambiguous ignore works over restrict: tests/integration/test_fim/test_registry/test_registry_ambiguous_confs/test_registry_ambiguous_ignore_works_over_restrict.md - - Test registry ambiguous duplicated entries: tests/integration/test_fim/test_registry/test_registry_ambiguous_confs/test_registry_ambiguous_duplicated_entries.md - - Test registry ambiguous conf: tests/integration/test_fim/test_registry/test_registry_ambiguous_confs/test_registry_ambiguous_confs.md - - Test registry ambiguous complex: tests/integration/test_fim/test_registry/test_registry_ambiguous_confs/test_registry_ambiguous_complex.md - - Test registry basic usage: - - tests/integration/test_fim/test_registry/test_registry_basic_usage/index.md - - Test basic usage delete registry: tests/integration/test_fim/test_registry/test_registry_basic_usage/test_basic_usage_delete_registry.md - - Test basic usage entries match key count: tests/integration/test_fim/test_registry/test_registry_basic_usage/test_basic_usage_entries_match_key_count.md - - Test basic usage registry baseline generation: tests/integration/test_fim/test_registry/test_registry_basic_usage/test_basic_usage_registry_baseline_generation.md - - Test basic usage registry changes: tests/integration/test_fim/test_registry/test_registry_basic_usage/test_basic_usage_registry_changes.md - - Test basic new key: tests/integration/test_fim/test_registry/test_registry_basic_usage/test_basic_usage_registry_new_key.md - - Test long registry path: tests/integration/test_fim/test_registry/test_registry_basic_usage/test_long_registry_path.md - - Test duplicated registry entries: tests/integration/test_fim/test_registry/test_registry_basic_usage/test_basic_usage_registry_duplicated_entries.md - - Test registry checks: - - tests/integration/test_fim/test_registry/test_registry_checks/index.md - - Test registry checks others: tests/integration/test_fim/test_registry/test_registry_checks/test_registry_check_others.md - - Test registry checkers: tests/integration/test_fim/test_registry/test_registry_checks/test_registry_checkers.md - - Test registry file limit: - - tests/integration/test_fim/test_registry/test_registry_file_limit/index.md - - Test registry limit capacity alerts: tests/integration/test_fim/test_registry/test_registry_file_limit/test_registry_limit_capacity_alerts.md - - Test registry limit full: tests/integration/test_fim/test_registry/test_registry_file_limit/test_registry_limit_full.md - - Test registry limit values: tests/integration/test_fim/test_registry/test_registry_file_limit/test_registry_limit_values.md - - Test registry ignore: - - tests/integration/test_fim/test_registry/test_registry_ignore/index.md - - Test ignore registry: tests/integration/test_fim/test_registry/test_registry_ignore/test_ignore_registry.md - - Test registry multiple registries: - - tests/integration/test_fim/test_registry/test_registry_multiple_registries/index.md - - Test multiple keys: tests/integration/test_fim/test_registry/test_registry_multiple_registries/test_multiple_keys.md - - Test multiple registry entries: tests/integration/test_fim/test_registry/test_registry_multiple_registries/test_multiple_registry_entries.md - - Test registry multiple registries: tests/integration/test_fim/test_registry/test_registry_multiple_registries/test_registry_multiple_registries.md - - Test registry nodiff: - - tests/integration/test_fim/test_registry/test_registry_nodiff/index.md - - Test registry no diff: tests/integration/test_fim/test_registry/test_registry_nodiff/test_registry_no_diff.md - - Test registry recursion level: - - tests/integration/test_fim/test_registry/test_registry_recursion_level/index.md - - Test recursion level registry: tests/integration/test_fim/test_registry/test_registry_recursion_level/test_recursion_level_registry.md # This fails - - Test registry report changes: - - tests/integration/test_fim/test_registry/test_registry_report_changes/index.md - - Test registry all limits disabled: tests/integration/test_fim/test_registry/test_registry_report_changes/test_registry_all_limits_disabled.md - - Test registry diff size limit values: tests/integration/test_fim/test_registry/test_registry_report_changes/test_registry_diff_size_limit_values.md - - Test registry disk quota default: tests/integration/test_fim/test_registry/test_registry_report_changes/test_registry_disk_quota_default.md - - Test registry disk quota values: tests/integration/test_fim/test_registry/test_registry_report_changes/test_registry_disk_quota_values.md - - Test registry file size default: tests/integration/test_fim/test_registry/test_registry_report_changes/test_registry_file_size_default.md - - Test registry file size values: tests/integration/test_fim/test_registry/test_registry_report_changes/test_registry_file_size_values.md - - Test registry report changes deleted: tests/integration/test_fim/test_registry/test_registry_report_changes/test_registry_report_changes_deleted.md - - Test registry report changes more changes: tests/integration/test_fim/test_registry/test_registry_report_changes/test_registry_report_changes_more_changes.md - - Test registry report changes: tests/integration/test_fim/test_registry/test_registry_report_changes/test_registry_report_changes.md - - Test registry restrict: tests/integration/test_fim/test_registry/test_registry_restrict - - Test registry restrict: tests/integration/test_fim/test_registry/test_registry_restrict/test_registry_restrict.md - - Test registry tags: - - tests/integration/test_fim/test_registry/test_registry_tags/index.md - - Test registry tags: tests/integration/test_fim/test_registry/test_registry_tags/test_registry_tags.md - - Test synchronization: - - tests/integration/test_fim/test_synchronization/index.md - - Test invalid sync response: tests/integration/test_fim/test_synchronization/test_invalid_sync_response.md - - Test response timeout: tests/integration/test_fim/test_synchronization/test_response_timeout.md - - Test sync disabled win32: tests/integration/test_fim/test_synchronization/test_sync_disabled_win32.md - - Test sync disabled: tests/integration/test_fim/test_synchronization/test_sync_disabled.md - - Test sync interval win32: tests/integration/test_fim/test_synchronization/test_sync_interval_win32.md - - Test sync interval: tests/integration/test_fim/test_synchronization/test_sync_interval.md - - Test synchronize integrity scan: tests/integration/test_fim/test_synchronization/test_synchronize_integrity_scan.md - - Test synchronize integrity win32: tests/integration/test_fim/test_synchronization/test_synchronize_integrity_win32.md - - Test registry responses win32: tests/integration/test_fim/test_synchronization/test_registry_responses_win32.md - - gCloud: - - tests/integration/test_gcloud/index.md - - Test configuration: - - tests/integration/test_gcloud/test_configuration/test_invalid.md - - tests/integration/test_gcloud/test_configuration/test_remote_configuration.md - - tests/integration/test_gcloud/test_configuration/test_schedule.md - - Test functioning: - - tests/integration/test_gcloud/test_functioning/test_day_wday.md - - tests/integration/test_gcloud/test_functioning/test_interval.md - - tests/integration/test_gcloud/test_functioning/test_logging.md - - tests/integration/test_gcloud/test_functioning/test_max_messages.md - - tests/integration/test_gcloud/test_functioning/test_pull_on_start.md - - tests/integration/test_gcloud/test_functioning/test_rules.md - - Remoted: - - tests/integration/test_remoted/index.md - - Test configuration: - - Overview: tests/integration/test_remoted/test_configuration/index.md - - Test invalid connection: tests/integration/test_remoted/test_configuration/test_basic_configuration_connection_invalid_connection.md - - Test invalid port: tests/integration/test_remoted/test_configuration/test_basic_configuration_connection_invalid_port.md - - Test invalid protocol: tests/integration/test_remoted/test_configuration/test_basic_configuration_connection_invalid_protocol.md - - Test connection valid: tests/integration/test_remoted/test_configuration/test_basic_configuration_connection_valid.md - - Test ipv6: tests/integration/test_remoted/test_configuration/test_basic_configuration_ipv6.md - - Test invalid local_ip: tests/integration/test_remoted/test_configuration/test_basic_configuration_local_ip_invalid.md - - Test valid local_ip: tests/integration/test_remoted/test_configuration/test_basic_configuration_local_ip_valid.md - - Test configuration queue_size syslog: tests/integration/test_remoted/test_configuration/test_basic_configuration_queue_size_syslog.md - - Test configuration queue_size too big: tests/integration/test_remoted/test_configuration/test_basic_configuration_queue_size_too_big.md - - Test configuration queue_size valid: tests/integration/test_remoted/test_configuration/test_basic_configuration_queue_size_valid.md - - Test configuration rids_closing_time valid: tests/integration/test_remoted/test_configuration/test_basic_configuration_rids_closing_time_valid.md - - Test configuration rids_closing_time invalid: tests/integration/test_remoted/test_configuration/test_basic_configuration_rids_closing_time_invalid.md - - Test configuration allowed ips invalid: tests/integration/test_remoted/test_configuration/test_basic_configuration_syslog_allowed_ips_invalid.md - - Test configuration denied ips invalid: tests/integration/test_remoted/test_configuration/test_basic_configuration_syslog_denied_ips_invalid.md - - Test configuration allowed and denied ips valids: tests/integration/test_remoted/test_configuration/test_basic_configuration_syslog_allowed_denied_ips_valid.md - - Test configuration denied ips: tests/integration/test_remoted/test_configuration/test_basic_configuration_syslog_denied_ips.md - - Test configuration syslog no allowed ips provided: tests/integration/test_remoted/test_configuration/test_basic_configuration_syslog_no_allowed_ips.md - - Test manager messages: - - tests/integration/test_remoted/test_manager_messages/test_manager_ack.md - - Test active response: tests/integration/test_remoted/test_active_response/test_active_response_ar_sending.md - - Test communications through the sockets: - - tests/integration/test_remoted/test_socket_communication/test_ping_pong_message.md - - tests/integration/test_remoted/test_socket_communication/test_syslog_message.md - - Test communications with agent: - - tests/integration/test_remoted/test_agent_communication/test_invalid_protocol_communication.md - - tests/integration/test_remoted/test_agent_communication/test_multi_agent_protocols_communication.md - - tests/integration/test_remoted/test_agent_communication/test_multi_agent_status.md - - tests/integration/test_remoted/test_agent_communication/test_protocols_communication.md - - tests/integration/test_remoted/test_agent_communication/test_request_agent_info.md - - tests/integration/test_remoted/test_agent_communication/test_shared_configuration.md - - tests/integration/test_remoted/test_agent_communication/test_agent_version_shared_configuration_startup_message.md - - tests/integration/test_remoted/test_agent_communication/test_agents_switching_protocols.md - - Logcollector: - - tests/integration/test_logcollector/index.md - - Test basic configuration: - - tests/integration/test_logcollector/test_configuration/index.md - - Test basic configuration age: tests/integration/test_logcollector/test_configuration/test_basic_configuration_age.md - - Test basic configuration alias: tests/integration/test_logcollector/test_configuration/test_basic_configuration_alias.md - - Test basic configuration command: tests/integration/test_logcollector/test_configuration/test_basic_configuration_command.md - - Test basic configuration exclude: tests/integration/test_logcollector/test_configuration/test_basic_configuration_exclude.md - - Test basic configuration frequency: tests/integration/test_logcollector/test_configuration/test_basic_configuration_frequency.md - - Test basic configuration ignore binaries: tests/integration/test_logcollector/test_configuration/test_basic_configuration_ignore_binaries.md - - Test basic configuration label: tests/integration/test_logcollector/test_configuration/test_basic_configuration_label.md - - Test basic configuration location: tests/integration/test_logcollector/test_configuration/test_basic_configuration_location.md - - Test basic configuration log format: tests/integration/test_logcollector/test_configuration/test_basic_configuration_log_format.md - - Test basic configuration only future events: tests/integration/test_logcollector/test_configuration/test_basic_configuration_only_future_events.md - - Test basic configuration out format: tests/integration/test_logcollector/test_configuration/test_basic_configuration_out_format.md - - Test basic configuration query: tests/integration/test_logcollector/test_configuration/test_basic_configuration_query.md - - Test basic configuration reconnect time: tests/integration/test_logcollector/test_configuration/test_basic_configuration_reconnect_time.md - - Test basic configuration target: tests/integration/test_logcollector/test_configuration/test_basic_configuration_target.md - - Test age: - - tests/integration/test_logcollector/test_age/index.md - - Test age basic: tests/integration/test_logcollector/test_age/test_age_basic.md - - Test age changed datetime: tests/integration/test_logcollector/test_age/test_age_changed_datetime.md - - Test command monitoring: - - Overview: tests/integration/test_logcollector/test_command_monitoring/index.md - - Test command execution: tests/integration/test_logcollector/test_command_monitoring/test_command_execution.md - - Test command execution freq: tests/integration/test_logcollector/test_command_monitoring/test_command_execution_freq.md - - Test reconnect time: tests/integration/test_logcollector/test_reconnect_time.md - - Test keep running: - - Test keep running: tests/integration/test_logcollector/test_keep_running/test_keep_running.md - - Test location: - - Overview: tests/integration/test_logcollector/test_location/index.md - - Test location: tests/integration/test_logcollector/test_location/test_location.md - - Test exclude: tests/integration/test_logcollector/test_location/test_location_exclude.md - - Test log format: - - Overview: tests/integration/test_logcollector/test_log_format/index.md - - Test log format: tests/integration/test_logcollector/test_log_format/test_log_format_values.md - - Test only future events: tests/integration/test_logcollector/test_only_future_events/test_only_future_events.md - - Test location custom sockets: tests/integration/test_logcollector/test_location_custom_sockets/test_location_custom_sockets.md - - Test macos: - - Overview: tests/integration/test_logcollector/test_macos/index.md - - Test macos file status basic: tests/integration/test_logcollector/test_macos/test_macos_file_status_basic.md - - Test macos file status predicate: tests/integration/test_logcollector/test_macos/test_macos_file_status_predicate.md - - Test macos file when no macos: tests/integration/test_logcollector/test_macos/test_macos_file_status_when_no_macos.md - - Test macos format basic: tests/integration/test_logcollector/test_macos/test_macos_format_basic.md - - Test only future events macos format: tests/integration/test_logcollector/test_macos/test_macos_format_only_future_events.md - - Test query macos format: tests/integration/test_logcollector/test_macos/test_macos_format_query.md - - Test macos multiline values: tests/integration/test_logcollector/test_macos/test_macos_multiline_values.md - - Test macos log process stop: tests/integration/test_logcollector/test_macos/test_macos_log_process_stop.md - - Test macos log process stop suddenly: tests/integration/test_logcollector/test_macos/test_macos_log_process_stop_suddenly.md - - Test macos log process: tests/integration/test_logcollector/test_macos/test_macos_log_process.md - - Test options: - - Overview: tests/integration/test_logcollector/test_options/index.md - - Test state interval: tests/integration/test_logcollector/test_options/test_options_state_interval.md - - Test state interval no file: tests/integration/test_logcollector/test_options/test_options_state_interval_no_file.md - - Test statistics: tests/integration/test_logcollector/test_statistics/test_statistics.md - - Logtest: - - tests/integration/test_logtest/index.md - - Test invalid token: tests/integration/test_logtest/test_invalid_token/test_invalid_session_token.md - - Test rules and decoders load: tests/integration/test_logtest/test_rules_decoders_load/test_load_rules_decoders.md - - Test remove session: tests/integration/test_logtest/test_remove_session/test_remove_session.md - - Test remove old session: - - Test remove old session: tests/integration/test_logtest/test_remove_old_sessions/test_remove_old_sessions.md - - Test remove old session for inactivity: tests/integration/test_logtest/test_remove_old_sessions/test_remove_old_session_for_inactivity.md - - Test invalid socket input: tests/integration/test_logtest/test_invalid_socket_input/test_invalid_socket_input.md - - Test configuration: - - Test configuration file: tests/integration/test_logtest/test_configuration/test_configuration_file.md - - Test get configuration sock: tests/integration/test_logtest/test_configuration/test_get_configuration_sock.md - - Test invalid rule decoders syntax: - - Test invalid decoder syntax: tests/integration/test_logtest/test_invalid_rule_decoders_syntax/test_invalid_decoder_syntax.md - - Test invalid rules syntax: tests/integration/test_logtest/test_invalid_rule_decoders_syntax/test_invalid_rules_syntax.md - - Test ruleset refresh: - - Test alert labels: tests/integration/test_logtest/test_ruleset_refresh/test_alert_labels.md - - Test cdb labels: tests/integration/test_logtest/test_ruleset_refresh/test_cdb_labels.md - - Test rule labels: tests/integration/test_logtest/test_ruleset_refresh/test_rule_labels.md - - Test decoder labels: tests/integration/test_logtest/test_ruleset_refresh/test_decoder_labels.md - - RIDS: - - tests/integration/test_rids/index.md - - Test rids conf: tests/integration/test_rids/test_rids.md - - Test rids: tests/integration/test_rids/test_rids_conf.md - - Rootcheck: - - tests/integration/test_rootcheck/index.md - - Test rootcheck: tests/integration/test_rootcheck/test_rootcheck.md - - WazuhDB: - - tests/integration/test_wazuh_db/index.md - - Test WazuhDB: tests/integration/test_wazuh_db/test_wazuh_db.md - - WPK: - - tests/integration/test_wpk/index.md - - Test wpk manager: tests/integration/test_wpk/test_wpk_manager.md - - Test wpk manager task states: tests/integration/test_wpk/test_wpk_manager_task_states.md - - Test wpk agent: tests/integration/test_wpk/test_wpk_agent.md - - System: - - tests/system/index.md - - Test cluster: - - tests/system/test_cluster/index.md - - Test agent info sync: tests/system/test_cluster/test_agent_info_sync/test_agent_info_sync.md - - Test agent files deletion: tests/system/test_cluster/test_agent_files_deletion/test_agent_files_deletion.md - - Test agent enrollment: tests/system/test_cluster/test_agent_enrollment/test_agent_enrollment.md - - Test agent key polling: tests/system/test_cluster/test_agent_key_polling/test_agent_key_polling.md - - Test integrity sync: tests/system/test_cluster/test_integrity_sync/test_integrity_sync.md - - Test JWT invalidation: - - tests/system/test_jwt_invalidation/index.md - - Test change RBAC mode: tests/system/test_jwt_invalidation/test_change_rbac_mode.md - - Tet change security resources: tests/system/test_jwt_invalidation/test_change_security_resources.md - - Test disconnected nodes: tests/system/test_jwt_invalidation/test_disconnected_nodes.md - - Test revoke endpoint: tests/system/test_jwt_invalidation/test_revoke_endpoint.md - - Test update password: tests/system/test_jwt_invalidation/test_update_password.md - - Scans: - - tests/scans/index.md - - Dependencies: - - Test Python dependencies: tests/scans/dependencies/test_dependencies.md - - Code Analysis: - - Test Python flaws: tests/scans/code_analysis/test_python_flaws.md - - Legacy: - - tests/legacy/index.md diff --git a/tests/integration/test_gcloud/conftest.py b/tests/integration/test_gcloud/conftest.py index 9804672581..d51c1494f9 100644 --- a/tests/integration/test_gcloud/conftest.py +++ b/tests/integration/test_gcloud/conftest.py @@ -9,7 +9,7 @@ from wazuh_testing.tools import WAZUH_PATH from wazuh_testing.tools.file import write_file, remove_file from wazuh_testing.gcloud import detect_gcp_start, publish_sync - +import wazuh_testing.tools.configuration as conf @pytest.fixture(scope='session', autouse=True) def handle_credentials_file(): @@ -49,3 +49,11 @@ def wait_for_gcp_start(get_configuration, request): # Wait for module gpc-pubsub starts file_monitor = getattr(request.module, 'wazuh_log_monitor') detect_gcp_start(file_monitor) + +@pytest.fixture(scope="session", autouse=True) +def configure_internal_options(): + local_internal_options = {'wazuh_modules.debug': 2, 'analysisd.debug': 2, 'monitord.rotate_log': 0, 'monitord.day_wait': 0, 'monitord.keep_log_days': 0,'monitord.size_rotate': 0} + conf.set_local_internal_options_dict(local_internal_options) + yield + local_internal_options = {'wazuh_modules.debug': 0, 'analysisd.debug': 0, "monitord.rotate_log": 1, "monitord.day_wait": 10, "monitord.keep_log_days": 31,'monitord.size_rotate': 512} + conf.set_local_internal_options_dict(local_internal_options) \ No newline at end of file diff --git a/tests/integration/test_gcloud/test_configuration/test_invalid.py b/tests/integration/test_gcloud/test_configuration/test_invalid.py index 10a44083d8..cca63054d7 100644 --- a/tests/integration/test_gcloud/test_configuration/test_invalid.py +++ b/tests/integration/test_gcloud/test_configuration/test_invalid.py @@ -54,7 +54,8 @@ - https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/gcp-pubsub.html tags: - - gcloud_configuration + - invalid + - config ''' import os import sys @@ -79,10 +80,11 @@ wazuh_log_monitor = FileMonitor(LOG_FILE_PATH) test_data_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data') configurations_path = os.path.join(test_data_path, 'invalid_conf.yaml') -force_restart_after_restoring = True +force_restart_after_restoring = False # configurations +daemons_handler_configuration = {'daemons': ['wazuh-modulesd'], 'ignore_errors' : True} monitoring_modes = ['scheduled'] conf_params = {'PROJECT_ID': global_parameters.gcp_project_id, 'SUBSCRIPTION_NAME': global_parameters.gcp_subscription_name, @@ -99,11 +101,10 @@ def get_configuration(request): """Get configurations from the module.""" return request.param - # tests @pytest.mark.skipif(sys.platform == "win32", reason="Windows does not have support for Google Cloud integration.") -def test_invalid(get_configuration, configure_environment, reset_ossec_log): +def test_invalid(get_configuration, configure_environment, reset_ossec_log, daemons_handler): ''' description: Check if the 'gcp-pubsub' module detects invalid configurations. For this purpose, the test will configure 'gcp-pubsub' using invalid configuration settings with different attributes. @@ -121,6 +122,9 @@ def test_invalid(get_configuration, configure_environment, reset_ossec_log): - reset_ossec_log: type: fixture brief: Reset the 'ossec.log' file and start a new monitor. + - daemons_handler: + type: fixture + brief: Handler of Wazuh daemons. assertions: - Verify that the 'gcp-pubsub' module generates error events when invalid configurations are used. @@ -138,33 +142,25 @@ def test_invalid(get_configuration, configure_environment, reset_ossec_log): tags: - invalid_settings ''' - # Configuration error -> ValueError raised - with pytest.raises(ValueError): - control_service('restart') - tags_to_apply = get_configuration['tags'][0] if tags_to_apply == 'invalid_gcp_wmodule': wazuh_log_monitor.start(timeout=global_parameters.default_timeout, callback=callback_detect_gcp_wmodule_err, - accum_results=1, error_message='Did not receive expected ' 'Invalid element in the configuration').result() elif tags_to_apply == 'invalid_day_wday': wazuh_log_monitor.start(timeout=global_parameters.default_timeout, callback=callback_detect_schedule_validate_parameters_err, - accum_results=1, error_message='Did not receive expected ' 'sched_scan_validate_parameters(): ERROR').result() elif tags_to_apply == 'invalid_schedule': wazuh_log_monitor.start(timeout=global_parameters.default_timeout, callback=callback_detect_schedule_read_err, - accum_results=1, error_message='Did not receive expected ' 'sched_scan_validate_parameters(): ERROR').result() else: wazuh_log_monitor.start(timeout=global_parameters.default_timeout, callback=callback_detect_gcp_read_err, - accum_results=1, error_message='Did not receive expected ' 'wm_gcp_read(): ERROR:').result() diff --git a/tests/integration/test_gcloud/test_configuration/test_remote_configuration.py b/tests/integration/test_gcloud/test_configuration/test_remote_configuration.py index ef3b7f50b4..f247bceb81 100644 --- a/tests/integration/test_gcloud/test_configuration/test_remote_configuration.py +++ b/tests/integration/test_gcloud/test_configuration/test_remote_configuration.py @@ -54,7 +54,8 @@ - https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/gcp-pubsub.html tags: - - gcloud_configuration + - config + - remote ''' import os import pytest @@ -90,6 +91,7 @@ # configurations +daemons_handler_configuration = {'daemons': ['wazuh-modulesd'], 'ignore_errors' : True} monitoring_modes = ['scheduled'] conf_params = {'PROJECT_ID': global_parameters.gcp_project_id, 'SUBSCRIPTION_NAME': global_parameters.gcp_subscription_name, @@ -100,7 +102,7 @@ p, m = generate_params(extra_params=conf_params, modes=monitoring_modes) configurations = load_wazuh_configurations(configurations_path, __name__, params=p, metadata=m) -force_restart_after_restoring = True +force_restart_after_restoring = False # fixtures @@ -147,8 +149,7 @@ def get_remote_configuration(component_name, config): @pytest.mark.skipif(sys.platform == "win32", reason="Windows does not have support for Google Cloud integration.") -def test_remote_configuration(get_configuration, configure_environment, - restart_wazuh, wait_for_gcp_start): +def test_remote_configuration(get_configuration, configure_environment, reset_ossec_log, daemons_handler, wait_for_gcp_start): ''' description: Check if the remote configuration matches the local configuration of the 'gcp-pubsub' module. For this purpose, the test will use different settings and get the remote configuration applied. diff --git a/tests/integration/test_gcloud/test_configuration/test_schedule.py b/tests/integration/test_gcloud/test_configuration/test_schedule.py index 28d5ff88c4..cfce9c785d 100644 --- a/tests/integration/test_gcloud/test_configuration/test_schedule.py +++ b/tests/integration/test_gcloud/test_configuration/test_schedule.py @@ -54,7 +54,8 @@ - https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/gcp-pubsub.html#interval tags: - - gcloud_configuration + - config + - schedule ''' import os import sys @@ -66,6 +67,7 @@ from wazuh_testing.tools import LOG_FILE_PATH from wazuh_testing.tools.configuration import load_wazuh_configurations from wazuh_testing.tools.monitoring import FileMonitor +from wazuh_testing.tools.file import truncate_file # Marks @@ -77,10 +79,11 @@ wazuh_log_monitor = FileMonitor(LOG_FILE_PATH) test_data_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data') configurations_path = os.path.join(test_data_path, 'schedule_conf.yaml') -force_restart_after_restoring = True +force_restart_after_restoring = False # configurations +daemons_handler_configuration = {'daemons': ['wazuh-modulesd']} monitoring_modes = ['scheduled'] conf_params = {'PROJECT_ID': global_parameters.gcp_project_id, 'SUBSCRIPTION_NAME': global_parameters.gcp_subscription_name, @@ -102,7 +105,7 @@ def get_configuration(request): # tests @pytest.mark.skipif(sys.platform == "win32", reason="Windows does not have support for Google Cloud integration.") -def test_schedule(get_configuration, configure_environment, restart_wazuh): +def test_schedule(get_configuration, configure_environment, reset_ossec_log, daemons_handler): ''' description: Check if the 'gcp-pubsub' module is executed in the periods specified in the 'interval' tag. For this purpose, the test will use different values for the 'interval' tag (a positive number @@ -137,44 +140,22 @@ def test_schedule(get_configuration, configure_environment, restart_wazuh): tags: - scheduled ''' + str_interval = get_configuration['sections'][0]['elements'][3]['interval']['value'] time_interval = int(''.join(filter(str.isdigit, str_interval))) tags_to_apply = get_configuration['tags'][0] - - if tags_to_apply == 'schedule_day': - if 'M' not in str_interval: - wazuh_log_monitor.start(timeout=global_parameters.default_timeout + time_interval, - callback=callback_detect_schedule_validate_parameters_warn, - accum_results=2, - error_message='Did not receive expected ' - 'at _sched_scan_validate_parameters(): WARNING:').result() - else: - with pytest.raises(TimeoutError): - event = wazuh_log_monitor.start(timeout=global_parameters.default_timeout, - callback=callback_detect_schedule_validate_parameters_warn).result() - raise AttributeError(f'Unexpected event {event}') - - elif tags_to_apply == 'schedule_wday': - if 'w' not in str_interval: - wazuh_log_monitor.start(timeout=global_parameters.default_timeout + time_interval, - callback=callback_detect_schedule_validate_parameters_warn, - accum_results=2, - error_message='Did not receive expected ' - 'at _sched_scan_validate_parameters(): WARNING:').result() - else: - with pytest.raises(TimeoutError): - event = wazuh_log_monitor.start(timeout=global_parameters.default_timeout, - callback=callback_detect_schedule_validate_parameters_warn).result() - raise AttributeError(f'Unexpected event {event}') + + # Warning log must appear in log (cause interval is not compatible with ) + if (tags_to_apply == 'schedule_day' and 'M' not in str_interval) or \ + (tags_to_apply == 'schedule_wday' and 'w' not in str_interval) or \ + (tags_to_apply == 'schedule_time' and ('d' not in str_interval and 'w' not in str_interval)): + wazuh_log_monitor.start(timeout=global_parameters.default_timeout + time_interval, + callback=callback_detect_schedule_validate_parameters_warn, + error_message='Did not receive expected ' + 'at _sched_scan_validate_parameters(): WARNING:').result() + # Warning is not suppose to appear else: - if 'd' not in str_interval and 'w' not in str_interval: - wazuh_log_monitor.start(timeout=global_parameters.default_timeout + time_interval, - callback=callback_detect_schedule_validate_parameters_warn, - accum_results=2, - error_message='Did not receive expected ' - 'at _sched_scan_validate_parameters(): WARNING:').result() - else: - with pytest.raises(TimeoutError): - event = wazuh_log_monitor.start(timeout=global_parameters.default_timeout, - callback=callback_detect_schedule_validate_parameters_warn).result() - raise AttributeError(f'Unexpected event {event}') + with pytest.raises(TimeoutError): + event = wazuh_log_monitor.start(timeout=global_parameters.default_timeout, + callback=callback_detect_schedule_validate_parameters_warn).result() + raise AttributeError(f'Unexpected event {event}') diff --git a/tests/integration/test_gcloud/test_functionality/test_day_wday.py b/tests/integration/test_gcloud/test_functionality/test_day_wday.py index c2b7653cde..724021a41b 100644 --- a/tests/integration/test_gcloud/test_functionality/test_day_wday.py +++ b/tests/integration/test_gcloud/test_functionality/test_day_wday.py @@ -56,7 +56,10 @@ - https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/gcp-pubsub.html#time tags: - - gcloud_functionality + - week_day + - scan + - scheduled + - interval ''' import datetime import os @@ -86,6 +89,7 @@ day = today.day weekDays = ("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday") +monthDays = {"1": 31, "2": 28, "3": 31, "4": 30, "5": 31, "6": 30, "7": 31, "8": 31, "9": 30, "10": 31, "11": 30, "12": 31} wday = weekDays[today.weekday()] now = datetime.datetime.now() @@ -94,10 +98,11 @@ wazuh_log_monitor = FileMonitor(LOG_FILE_PATH) test_data_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data') configurations_path = os.path.join(test_data_path, 'wazuh_schedule_conf.yaml') -force_restart_after_restoring = True +force_restart_after_restoring = False # configurations +daemons_handler_configuration = {'daemons': ['wazuh-modulesd']} monitoring_modes = ['scheduled'] conf_params = {'PROJECT_ID': global_parameters.gcp_project_id, 'SUBSCRIPTION_NAME': global_parameters.gcp_subscription_name, @@ -128,8 +133,7 @@ def get_configuration(request): ({'ossec_time_conf'}) ]) @pytest.mark.skipif(sys.platform == "win32", reason="Windows does not have support for Google Cloud integration.") -def test_day_wday(tags_to_apply, get_configuration, configure_environment, - restart_wazuh, wait_for_gcp_start): +def test_day_wday(tags_to_apply, get_configuration, configure_environment, reset_ossec_log, daemons_handler, wait_for_gcp_start): ''' description: Check if the 'gcp-pubsub' module starts to pull logs according to the day of the week, of the month, or time set in the configuration. For this purpose, the test will use @@ -195,22 +199,15 @@ def get_next_scan(next_scan_time: str): error_message='Did not receive expected ' '"Sleeping until ..." event').result() - TimeMachine.travel_to_future(datetime.timedelta(seconds=get_next_scan(next_scan_time_log))) - - wazuh_log_monitor.start(timeout=global_parameters.default_timeout, - callback=callback_detect_start_fetching_logs, - error_message='Did not receive expected ' - '"Starting fetching of logs" event') - @pytest.mark.parametrize('tags_to_apply', [ ({'ossec_day_multiple_conf'}), ({'ossec_wday_multiple_conf'}), ({'ossec_time_multiple_conf'}) ]) + @pytest.mark.skipif(sys.platform == "win32", reason="Windows does not have support for Google Cloud integration.") -def test_day_wday_multiple(tags_to_apply, get_configuration, configure_environment, - restart_wazuh, wait_for_gcp_start): +def test_day_wday_multiple(tags_to_apply, get_configuration, configure_environment, reset_ossec_log, daemons_handler, wait_for_gcp_start): ''' description: Check if the 'gcp-pubsub' module calculates the next scan correctly using time intervals greater than one month, one week, or one day. For this purpose, the test will use different @@ -259,7 +256,6 @@ def test_day_wday_multiple(tags_to_apply, get_configuration, configure_environme next_scan_time_log = wazuh_log_monitor.start(timeout=global_parameters.default_timeout + 60, callback=callback_detect_start_gcp_sleep, - accum_results=1, error_message='Did not receive expected ' '"Sleeping until ..." event').result() @@ -272,11 +268,18 @@ def test_day_wday_multiple(tags_to_apply, get_configuration, configure_environme if tags_to_apply == {'ossec_day_multiple_conf'}: if today.month + time_interval <= 12: - assert next_scan_time.month == today.month + time_interval + expected_month = today.month + time_interval else: - assert next_scan_time.month == (today.month + time_interval) % 12 + expected_month = (today.month + time_interval) % 12 + + if today.day > monthDays[str(expected_month)]: + expected_month = expected_month + 1 + + assert next_scan_time.month == expected_month + if tags_to_apply == {'ossec_wday_multiple_conf'}: assert weekDays[next_scan_time.weekday()] == wday assert next_scan_time.day == (today + datetime.timedelta(weeks=time_interval)).day + if tags_to_apply == {'ossec_time_multiple_conf'}: assert next_scan_time.day == (today + datetime.timedelta(days=time_interval)).day diff --git a/tests/integration/test_gcloud/test_functionality/test_interval.py b/tests/integration/test_gcloud/test_functionality/test_interval.py index c2b3c67581..f7b588a480 100644 --- a/tests/integration/test_gcloud/test_functionality/test_interval.py +++ b/tests/integration/test_gcloud/test_functionality/test_interval.py @@ -54,7 +54,9 @@ - https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/gcp-pubsub.html#interval tags: - - gcloud_functionality + - scan + - scheduled + - interval ''' import datetime import os @@ -68,6 +70,7 @@ from wazuh_testing.tools import LOG_FILE_PATH from wazuh_testing.tools.configuration import load_wazuh_configurations from wazuh_testing.tools.monitoring import FileMonitor +from wazuh_testing.tools.file import truncate_file # Marks @@ -82,10 +85,11 @@ wazuh_log_monitor = FileMonitor(LOG_FILE_PATH) test_data_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data') configurations_path = os.path.join(test_data_path, 'wazuh_conf.yaml') -force_restart_after_restoring = True +force_restart_after_restoring = False # configurations +daemons_handler_configuration = {'daemons': ['wazuh-modulesd']} monitoring_modes = ['scheduled'] conf_params = {'PROJECT_ID': global_parameters.gcp_project_id, 'SUBSCRIPTION_NAME': global_parameters.gcp_subscription_name, @@ -98,6 +102,9 @@ configurations = load_wazuh_configurations(configurations_path, __name__, params=p, metadata=m) +# Preparing + +truncate_file(LOG_FILE_PATH) # fixtures @@ -110,8 +117,7 @@ def get_configuration(request): # tests @pytest.mark.skipif(sys.platform == "win32", reason="Windows does not have support for Google Cloud integration.") -def test_interval(get_configuration, configure_environment, - restart_wazuh, wait_for_gcp_start): +def test_interval(get_configuration, configure_environment, reset_ossec_log, daemons_handler, wait_for_gcp_start): ''' description: Check if the 'gcp-pubsub' module starts to pull logs at the periods set in the configuration by the 'interval' tag. For this purpose, the test will use different intervals and check if @@ -159,7 +165,6 @@ def test_interval(get_configuration, configure_environment, start_time = time.time() next_scan_time_log = wazuh_log_monitor.start(timeout=global_parameters.default_timeout + 60, callback=callback_detect_start_gcp_sleep, - accum_results=1, error_message='Did not receive expected ' '"Sleeping until ..." event').result() @@ -174,9 +179,8 @@ def test_interval(get_configuration, configure_environment, wazuh_log_monitor.start(timeout=global_parameters.default_timeout + time_interval, callback=callback_detect_start_fetching_logs, - accum_results=1, error_message='Did not receive expected ' '"Starting fetching of logs" event').result() end_time = time.time() diff_time = int(end_time - start_time) - assert time_interval - diff_time <= 10 + assert time_interval - diff_time <= 10 \ No newline at end of file diff --git a/tests/integration/test_gcloud/test_functionality/test_logging.py b/tests/integration/test_gcloud/test_functionality/test_logging.py index 9a0064b514..c90a9684dc 100644 --- a/tests/integration/test_gcloud/test_functionality/test_logging.py +++ b/tests/integration/test_gcloud/test_functionality/test_logging.py @@ -54,7 +54,8 @@ - https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/gcp-pubsub.html#logging tags: - - gcloud_functionality + - logging + - logs ''' import os import sys @@ -80,10 +81,11 @@ wazuh_log_monitor = FileMonitor(LOG_FILE_PATH) test_data_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data') configurations_path = os.path.join(test_data_path, 'wazuh_conf.yaml') -force_restart_after_restoring = True +force_restart_after_restoring = False # configurations +daemons_handler_configuration = {'daemons': ['wazuh-analysisd', 'wazuh-modulesd']} monitoring_modes = ['scheduled'] conf_params = {'PROJECT_ID': global_parameters.gcp_project_id, 'SUBSCRIPTION_NAME': global_parameters.gcp_subscription_name, @@ -112,8 +114,7 @@ def get_configuration(request): @pytest.mark.parametrize('publish_messages', [ ['- DEBUG - GCP message' for _ in range(5)] ], indirect=True) -def test_logging(get_configuration, configure_environment, publish_messages, - restart_wazuh, wait_for_gcp_start): +def test_logging(get_configuration, configure_environment, reset_ossec_log, publish_messages, daemons_handler, wait_for_gcp_start): ''' description: Check if the 'gcp-pubsub' module generates logs according to the set type in the 'logging' tag. For this purpose, the test will use different logging levels (depending on the test case) and diff --git a/tests/integration/test_gcloud/test_functionality/test_max_messages.py b/tests/integration/test_gcloud/test_functionality/test_max_messages.py index 02b0c90dac..3283e94915 100644 --- a/tests/integration/test_gcloud/test_functionality/test_max_messages.py +++ b/tests/integration/test_gcloud/test_functionality/test_max_messages.py @@ -55,7 +55,9 @@ - https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/gcp-pubsub.html#max-messages tags: - - gcloud_functionality + - limits + - scan + - maximum ''' import os import sys @@ -67,6 +69,7 @@ from wazuh_testing.tools import LOG_FILE_PATH from wazuh_testing.tools.configuration import load_wazuh_configurations from wazuh_testing.tools.monitoring import FileMonitor +from wazuh_testing.tools.file import truncate_file from google.cloud import pubsub_v1 # Marks @@ -83,10 +86,11 @@ wazuh_log_monitor = FileMonitor(LOG_FILE_PATH) test_data_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data') configurations_path = os.path.join(test_data_path, 'wazuh_conf.yaml') -force_restart_after_restoring = True +force_restart_after_restoring = False # configurations +daemons_handler_configuration = {'daemons': ['wazuh-analysisd', 'wazuh-modulesd']} monitoring_modes = ['scheduled'] conf_params = {'PROJECT_ID': global_parameters.gcp_project_id, 'SUBSCRIPTION_NAME': global_parameters.gcp_subscription_name, @@ -99,6 +103,9 @@ configurations = load_wazuh_configurations(configurations_path, __name__, params=p, metadata=m) +# Preparing + +truncate_file(LOG_FILE_PATH) # fixtures @@ -116,8 +123,7 @@ def get_configuration(request): ['- DEBUG - GCP message' for _ in range(100)], ['- DEBUG - GCP message' for _ in range(120)] ], indirect=True) -def test_max_messages(get_configuration, configure_environment, publish_messages, - restart_wazuh, wait_for_gcp_start): +def test_max_messages(get_configuration, configure_environment, reset_ossec_log, publish_messages, daemons_handler, wait_for_gcp_start): ''' description: Check if the 'gcp-pubsub' module pulls a message number less than or equal to the limit set in the 'max_messages' tag. For this purpose, the test will use a fixed limit and generate a diff --git a/tests/integration/test_gcloud/test_functionality/test_pull_on_start.py b/tests/integration/test_gcloud/test_functionality/test_pull_on_start.py index dfb85cc390..181a6400ee 100644 --- a/tests/integration/test_gcloud/test_functionality/test_pull_on_start.py +++ b/tests/integration/test_gcloud/test_functionality/test_pull_on_start.py @@ -54,7 +54,10 @@ - https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/gcp-pubsub.html#pull-on-start tags: - - gcloud_functionality + - pull + - config + - on_start + - scan ''' import os import sys @@ -80,10 +83,11 @@ wazuh_log_monitor = FileMonitor(LOG_FILE_PATH) test_data_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data') configurations_path = os.path.join(test_data_path, 'wazuh_conf.yaml') -force_restart_after_restoring = True +force_restart_after_restoring = False # configurations +daemons_handler_configuration = {'daemons': ['wazuh-modulesd']} monitoring_modes = ['scheduled'] conf_params = {'PROJECT_ID': global_parameters.gcp_project_id, 'SUBSCRIPTION_NAME': global_parameters.gcp_subscription_name, @@ -109,7 +113,7 @@ def get_configuration(request): @pytest.mark.skipif(sys.platform == "win32", reason="Windows does not have support for Google Cloud integration.") def test_pull_on_start(get_configuration, configure_environment, - restart_wazuh, wait_for_gcp_start): + daemons_handler, wait_for_gcp_start): ''' description: Check if the 'gcp-pubsub' module pulls messages when starting if the 'pull_on_start' is set to 'yes', or sleeps up to the next interval if that one is set to 'no'. For this diff --git a/tests/integration/test_gcloud/test_functionality/test_rules.py b/tests/integration/test_gcloud/test_functionality/test_rules.py index 96415d9a95..72bed075fd 100644 --- a/tests/integration/test_gcloud/test_functionality/test_rules.py +++ b/tests/integration/test_gcloud/test_functionality/test_rules.py @@ -53,7 +53,8 @@ - https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/gcp-pubsub.html tags: - - gcloud_functionality + - rules + - config ''' import os import sys @@ -65,6 +66,7 @@ from wazuh_testing.tools import LOG_FILE_PATH from wazuh_testing.tools.configuration import load_wazuh_configurations from wazuh_testing.tools.monitoring import FileMonitor +from wazuh_testing.tools.file import truncate_file # Marks @@ -80,9 +82,11 @@ test_data_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data') configurations_path = os.path.join(test_data_path, 'wazuh_conf.yaml') file_path = os.path.join(test_data_path, 'gcp_events.txt') +force_restart_after_restoring = False # configurations +daemons_handler_configuration = {'daemons': ['wazuh-modulesd', 'wazuh-analysisd']} monitoring_modes = ['scheduled'] conf_params = {'PROJECT_ID': global_parameters.gcp_project_id, 'SUBSCRIPTION_NAME': global_parameters.gcp_subscription_name, @@ -96,6 +100,10 @@ configurations = load_wazuh_configurations(configurations_path, __name__, params=p, metadata=m) +# Preparing + +truncate_file(LOG_FILE_PATH) + # fixtures @pytest.fixture(scope='module', params=configurations) @@ -108,7 +116,7 @@ def get_configuration(request): @pytest.mark.skipif(sys.platform == "win32", reason="Windows does not have support for Google Cloud integration.") def test_rules(get_configuration, configure_environment, - restart_wazuh, wait_for_gcp_start): + daemons_handler, wait_for_gcp_start): ''' description: Check if the 'gcp-pubsub' module gets messages matching the GCP rules. It also checks if the triggered alerts contain the proper rule ID. For this purpose, the test will @@ -162,7 +170,7 @@ def test_rules(get_configuration, configure_environment, # Publish messages to pull them later publish_sync(global_parameters.gcp_project_id, global_parameters.gcp_topic_name, global_parameters.gcp_credentials_file, [line.strip()]) - event = wazuh_log_monitor.start(timeout=global_parameters.default_timeout + time_interval, + event = wazuh_log_monitor.start(timeout=global_parameters.default_timeout + time_interval + 100, callback=callback_detect_gcp_alert, accum_results=1, error_message='Did not receive expected '