diff --git a/CHANGELOG.md b/CHANGELOG.md index fcc5c148ca..723351afa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ Release report: TBD ### Added -- Add tests for msu patches with no associated CVE . ([#4009](https://github.com/wazuh/wazuh-qa/pull/4009)) \- (Framework + tests) +- Add tests for msu patches with no associated CVE . ([#4009](https://github.com/wazuh/wazuh-qa/pull/4009)) \- (Framework + Tests) - Add tests with new options to avoid FIM synchronization overlapping. ([#3318](https://github.com/wazuh/wazuh-qa/pull/3318)) \- (Framework + tests) - Add Logcollector millisecond granularity support test case ([#3910](https://github.com/wazuh/wazuh-qa/pull/3910)) \- (Tests) - Add Windows System folders FIM monitoring tests ([#3720](https://github.com/wazuh/wazuh-qa/pull/3720)) \- (Tests) diff --git a/deps/wazuh_testing/wazuh_testing/modules/fim/classes.py b/deps/wazuh_testing/wazuh_testing/modules/fim/classes.py index 07df0bf1ec..06b734fd6f 100644 --- a/deps/wazuh_testing/wazuh_testing/modules/fim/classes.py +++ b/deps/wazuh_testing/wazuh_testing/modules/fim/classes.py @@ -460,7 +460,7 @@ def validate_checkers_per_event(events, options, mode): if self.is_value: validate_registry_event(ev, options, mode, is_key=False) else: - validate_registry_event(ev, options, mode, is_key=False) + validate_registry_event(ev, options, mode, is_key=True) def check_events_type(events, ev_type, reg_list=['testkey0']): """Checks the event type of each events in a list. diff --git a/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_msu_inventory.yaml b/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_msu_inventory.yaml index 6e686a94b5..db48d15f07 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_msu_inventory.yaml +++ b/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_msu_inventory.yaml @@ -1,4 +1,4 @@ -- name: Check Patches with no CVE present +- name: check_patches_with_no_cve_present description: Test patches with no associated CVE are added from the catalog configuration_parameters: PROVIDER: msu diff --git a/tests/integration/test_vulnerability_detector/test_feeds/test_msu_inventory.py b/tests/integration/test_vulnerability_detector/test_feeds/test_msu_inventory.py index adaaef5b97..ca955bc3b7 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/test_msu_inventory.py +++ b/tests/integration/test_vulnerability_detector/test_feeds/test_msu_inventory.py @@ -99,7 +99,7 @@ def test_msu_catalog_patches(configuration, metadata, set_wazuh_configuration_vd Test: - Check in log that the database provider has been updated successfully. - Query the DB to check patch is found in MSU_SUPERSEDENSE table - - Query the DB to check patch is not found in MSU table (Has not Vulnerability linked to it). + - Query the DB to check patch is not found in MSU table (has no Vulnerability linked to it). Teardown: - Clean the database. - Stop wazuh-modulesd. @@ -131,7 +131,7 @@ def test_msu_catalog_patches(configuration, metadata, set_wazuh_configuration_vd assertions: - Check that the feed is downloaded successfully. - Check that the referenced patch is found in MSU_SUPERSEDENSE table - - Check that the referenced patch is not foundin MSU table (Has not Vulnerability linked to it). + - Check that the referenced patch is not foundin MSU table (has no Vulnerability linked to it). input_description: - The `configuration_msu_inventory.yaml` file provides the module configuration for this test. @@ -146,9 +146,9 @@ def test_msu_catalog_patches(configuration, metadata, set_wazuh_configuration_vd for patch in patch_references: # Check that patch is present in MSU_SUPERSEDENCE table - result = get_rows_from_table(patch, 'patch', 'MSU_SUPERSEDENCE') - assert result is not None, f"The Expected data for KB{patch} was not found in MSU_SUPERSEDENCE Table" + patch_found = get_rows_from_table(patch, 'patch', 'MSU_SUPERSEDENCE') + assert patch_found is not None, f"The Expected data for KB{patch} was not found in MSU_SUPERSEDENCE Table" # Check that patch is not present in MSU table - result = get_rows_from_table(patch, 'patch', 'MSU') - assert result is None, f"Unexpected data found for KB{patch} in MSU Table" + patch_in_table = get_rows_from_table(patch, 'patch', 'MSU') + assert patch_in_table is None, f"Unexpected data found for KB{patch} in MSU Table"