Add new analysisd
test suite: test_limit_eps
#3419
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new testing suite for analysisd that verifies the correct functioning of the new feature introduced in 4.4, the limitation of event analysis per second.
The added modules and tests are mentioned below:
test_basic.py
test_enabled
: Prueba que el módulo se activa en los casos esperadostest_disabled
: Prueba que el módulo no se activa en los casos esperadostest_configuration.py:
test_accepted_values
: Check that the EPS limitation is activated under accepted parameters.test_invalid_values
: Check for configuration error and wazuh-analysisd if the EPS limiting configuration has unaccepted values. Done for the following cases:test_missing_configuration
: Check what happens if tags are missing in the event analysis limitation settings. Done for the following cases:<timeframe>
.<maximum>
.<timeframe>
and<maximum>
.test_event_processing.py:
test_limitation
: Check if after passing the event processing limit, the processing is stopped until the next timeframe.test_queueing_events_after_limitation
: Check if after stopping processing events (due to limit reached), the received events are stored in the events queue if it is not full.test_dropping_events_when_queue_is_full
: Check that after the event analysis block, if the events queue is full, the events are dropped.test_event_processing_in_order_single_thread
: Check that events are processed in order according to the position within the queue, and that events that are being received during the blocking phase are being added to the end of the queue when using single-thread processing.test_event_processing_in_order_multi_thread
: Check that events are processed in order according to the position within the queue, and that events that are being received during the blocking phase are being added to the end of the queue when using multi-thread processing.Testing performed
test_analysisd/test_limit_eps