Skip to content

Commit

Permalink
style(#3361): fix spacing and whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Deblintrake09 committed Apr 24, 2023
1 parent 3d1cf31 commit de171f5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion deps/wazuh_testing/wazuh_testing/db_interface/cve_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def get_rows_from_table(value, column, table, limit=None):
"""

query_string = f"SELECT * FROM {table} WHERE {column} LIKE '{value}'"

if limit is not None:
query_string = query_string + f"LIMIT {limit}"

Expand Down
2 changes: 1 addition & 1 deletion deps/wazuh_testing/wazuh_testing/modules/fim/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=False)

def check_events_type(events, ev_type, reg_list=['testkey0']):
"""Checks the event type of each events in a list.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@
# Variables
patch_references = ['4465477', '5003711', '4470788']


@pytest.mark.tier(level=2)
@pytest.mark.parametrize('configuration, metadata', zip(configurations, configuration_metadata), ids=case_ids)
def test_msu_catalog_patches(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files,
clean_cve_tables_func, restart_modulesd_function):
clean_cve_tables_func, restart_modulesd_function):
'''
description: Check that patch information is added to the feed from the catalog for patches not directly related
to a Vulnerability.
Expand All @@ -102,8 +103,6 @@ def test_msu_catalog_patches(configuration, metadata, set_wazuh_configuration_vd
- Clean the database.
- Stop wazuh-modulesd.
wazuh_min_version: 4.5.0
tier: 2
Expand Down Expand Up @@ -143,12 +142,12 @@ def test_msu_catalog_patches(configuration, metadata, set_wazuh_configuration_vd
# Check that the feed has been updated successfully
evm.check_provider_database_update_finish_log(provider_name=metadata['provider_name'],
timeout=metadata['download_timeout'])

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"

# 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"
assert result is None, f"Unexpected data found for KB{patch} in MSU Table"

0 comments on commit de171f5

Please sign in to comment.