Skip to content

Commit

Permalink
docu(#3036): update tests min version
Browse files Browse the repository at this point in the history
  • Loading branch information
Deblintrake09 committed Sep 9, 2022
1 parent 02be715 commit 418115e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 14 deletions.
3 changes: 2 additions & 1 deletion deps/wazuh_testing/wazuh_testing/fim_module/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@
CB_DATABASE_FULL_COULD_NOT_INSERT_VALUE = r".*Couldn't insert ('.*')? value entry into DB\. The DB is full.*"
CB_FILE_LIMIT_VALUE = r".*Maximum number of entries to be monitored: '(\d+)'"
CB_FILE_SIZE_LIMIT_BIGGER_THAN_DISK_QUOTA = r".*Setting 'disk_quota' to (\d+), 'disk_quota' must be greater than 'file_size'"
CB_FILE_LIMIT_DISABLED = r".*(No limit set) to maximum number of entries to be monitored"
CB_FILE_LIMIT_DISABLED = r".*(No limit set) to maximum number of file entries to be monitored"
CB_INODE_ENTRIES_PATH_COUNT = r".*Fim inode entries: '(\d+)', path count: '(\d+)'"
CB_FIM_ENTRIES_COUNT = r".*Fim entries: (\d+)"
CB_DETECT_FIM_EVENT = r'.*Sending FIM event: (.+)$'
CB_IGNORING_DUE_TO_SREGEX = r".*?Ignoring path '(.*)' due to sregex '(.*)'.*"
CB_IGNORING_DUE_TO_PATTERN = r".*?Ignoring path '(.*)' due to pattern '(.*)'.*"



# Error Messages
ERR_MSG_DATABASE_PERCENTAGE_FULL_ALERT = 'Did not receive expected "DEBUG: ...: Sending DB ...% full alert." event'
ERR_MSG_FIM_INODE_ENTRIES = 'Did not receive expected "Fim inode entries: ..., path count: ..." event'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def test_file_limit_capacity_alert(percentage, get_configuration, configure_envi
the total and when the number is less than that percentage. Finally, the test will verify that
on the FIM event, inodes and monitored files number match.
wazuh_min_version: 4.2.0
wazuh_min_version: 4.5.0
tier: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,14 @@ def get_configuration(request):


# Tests

@pytest.mark.skipif(sys.platform == 'win32', reason="Blocked by wazuh/wazuh#11819")
def test_file_limit_default(get_configuration, configure_environment, restart_syscheckd):
'''
description: Check if the maximum number of files monitored by the 'wazuh-syscheckd' daemon is set to default
when the 'file_limit' tag is missing in the configuration. For this purpose, the test will monitor
a directory and wait for FIM to start and generate an event indicating the maximum number of files
to monitor. Finally, the test will verify that this number matches the default value (100000).
wazuh_min_version: 4.2.0
wazuh_min_version: 4.5.0
tier: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def test_file_limit_delete_full(folder, file_name, get_configuration, configure_
no FIM events to be generated (file limit reached). Finally, it will delete 'test_file10'
and verify that the 'deleted' FIM event matches that file.
wazuh_min_version: 4.2.0
wazuh_min_version: 4.5.0
tier: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ def extra_configuration_before_yield():


# Tests

def test_file_limit_full(get_configuration, configure_environment, restart_syscheckd):
'''
description: Check if the 'wazuh-syscheckd' daemon generates proper events while the FIM database is in
Expand All @@ -130,7 +129,7 @@ def test_file_limit_full(get_configuration, configure_environment, restart_sysch
when a new testing file is added to the monitored directory. Finally, the test will verify that
on the FIM event, inodes and monitored files number match.
wazuh_min_version: 4.2.0
wazuh_min_version: 4.5.0
tier: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,13 @@ def get_configuration(request):


# Tests

@pytest.mark.skipif(sys.platform == 'win32', reason="Blocked by wazuh/wazuh #11162")
def test_file_limit_no_limit(get_configuration, configure_environment, restart_syscheckd):
'''
description: Check if the 'wazuh-syscheckd' daemon detects that the 'file_limit' feature of FIM is disabled.
For this purpose, the test will monitor a testing directory, and finally, it will verify
that the FIM event 'no limit' is generated.
wazuh_min_version: 4.2.0
wazuh_min_version: 4.5.0
tier: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ def extra_configuration_before_yield():


# Tests

@pytest.mark.skipif(sys.platform == 'win32', reason="Blocked by wazuh/wazuh #11819")
def test_file_limit_values(get_configuration, configure_environment, restart_syscheckd):
'''
description: Check if the 'wazuh-syscheckd' daemon detects that the value of the 'entries' tag, which corresponds
Expand All @@ -132,7 +130,7 @@ def test_file_limit_values(get_configuration, configure_environment, restart_sys
is generated and has the correct value. Finally, the test will verify that on the FIM event,
inodes and monitored files number match.
wazuh_min_version: 4.2.0
wazuh_min_version: 4.5.0
tier: 1
Expand Down

0 comments on commit 418115e

Please sign in to comment.