Skip to content

Commit

Permalink
refactor(#2947): refactor code style
Browse files Browse the repository at this point in the history
  • Loading branch information
fedepacher committed Sep 2, 2022
1 parent 120e6c0 commit a30dcef
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 0 additions & 2 deletions deps/wazuh_testing/wazuh_testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
WAZUH_DB_SOCKET_PATH = os.path.join(QUEUE_DB_PATH, 'wdb')
CVE_DB_PATH = os.path.join(WAZUH_PATH, 'queue', 'vulnerabilities', 'cve.db')
LOG_FILE_PATH = os.path.join(WAZUH_PATH, 'logs', 'ossec.log')
ALERTS_DIRECTORY_PATH = os.path.join(WAZUH_LOGS_PATH, 'alerts')
ALERTS_JSON_PATH = os.path.join(WAZUH_PATH, 'logs', 'alerts', 'alerts.json')
CPE_HELPER_PATH = os.path.join(WAZUH_PATH, 'queue', 'vulnerabilities', 'dictionaries', 'cpe_helper.json')
WAZUH_API_CONF = os.path.join(WAZUH_PATH, 'api', 'configuration', 'api.yaml')
Expand Down Expand Up @@ -60,7 +59,6 @@
SIMULATE_AGENT = os.path.join(WAZUH_TESTING_PATH, 'scripts', 'simulate_agents.py')
SYSLOG_SIMULATOR = os.path.join(WAZUH_TESTING_PATH, 'scripts', 'syslog_simulator.py')
ANALYSISD_STATE = os.path.join(WAZUH_PATH, 'var', 'run', 'wazuh-analysisd.state')
WAZUH_INTERNAL_OPTIONS = os.path.join(WAZUH_PATH, 'etc', 'internal_options.conf')

# Timeouts
T_5 = 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def get_analysisd_state():


def get_messages_info(file_monitor, message, accum_results):
"""Check if the alerts.log file contains the message
"""Check if the alerts.json file contains the message
Args:
file_monitor (FileMonitor): Wazuh log monitor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,4 +358,4 @@ def main():


if __name__ == "__main__":
main()
main()
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
@pytest.mark.tier(level=0)
@pytest.mark.parametrize('configuration, metadata', zip(t1_configurations, t1_configuration_metadata), ids=t1_case_ids)
@pytest.mark.parametrize('configure_local_internal_options_eps', [ANALYSISD_STATE_INTERNAL_DEFAULT], indirect=True)
def test_without_timeframe_maximum(configuration, metadata, load_wazuh_basic_configuration, set_wazuh_configuration_analysisd,
truncate_monitored_files, restart_wazuh_daemon_after_finishing):
def test_without_timeframe_maximum(configuration, metadata, load_wazuh_basic_configuration,
set_wazuh_configuration_analysisd, truncate_monitored_files,
restart_wazuh_daemon_after_finishing):
'''
description: Check that wazuh manager is not started when `maximum` and `timeframe` are not present in the
configuration file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@
@pytest.mark.parametrize('configuration, metadata', zip(t1_configurations, t1_configuration_metadata), ids=t1_case_ids)
@pytest.mark.parametrize('configure_local_internal_options_eps', [timeframe_eps_t1], indirect=True)
@pytest.mark.parametrize('simulate_agent_function', [params_stop_processing_events], indirect=True)
def test_stops_processing_events(configuration, metadata, load_wazuh_basic_configuration, set_wazuh_configuration_analysisd,
truncate_monitored_files, restart_wazuh_daemon_function, simulate_agent_function):
def test_stops_processing_events(configuration, metadata, load_wazuh_basic_configuration,
set_wazuh_configuration_analysisd, truncate_monitored_files,
restart_wazuh_daemon_function, simulate_agent_function):
'''
description: Check that the `events_processed` value in the `/var/ossec/var/run/wazuh-analysisd.state` file must
be lower or equal than `maximum` * `timeframe`
Expand Down

0 comments on commit a30dcef

Please sign in to comment.