-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add localfile wildcard support for windows IT #4263
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Deblintrake09
changed the title
3786 location wildcards
Add localfile wildcard support for windows IT
Jul 3, 2023
6 tasks
juliamagan
requested changes
Jul 3, 2023
tests/integration/test_logcollector/test_location/test_win_location_wildcards
Outdated
Show resolved
Hide resolved
juliamagan
previously approved these changes
Jul 3, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
jnasselle
requested changes
Jul 26, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also it seems to be some problems loading configurations.
============================= test session starts ==============================
platform linux -- Python 3.10.9, pytest-7.1.2, pluggy-1.0.0 -- /bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.10.9', 'Platform': 'Linux-3.10.0-1160.81.1.el7.x86_64-x86_64-with-glibc2.17', 'Packages': {'pytest': '7.1.2', 'pluggy': '1.0.0'}, 'Plugins': {'testinfra': '5.0.0', 'metadata':
'2.0.4', 'html': '3.1.1'}}
rootdir: /tmp/Test_integration_B41699_20230726122239/tests/integration, configfile: pytest.ini
plugins: testinfra-5.0.0, metadata-2.0.4, html-3.1.1
collecting ... collected 631 items / 4 errors / 97 deselected / 534 selected
==================================== ERRORS ====================================
_ ERROR collecting test_logcollector/test_configuration/test_basic_configuration_ignore_binaries.py _
test_logcollector/test_configuration/test_basic_configuration_ignore_binaries.py:91: in <module>
prefix = LOG_COLLECTOR_DETECTOR_PREFIX
E NameError: name 'LOG_COLLECTOR_DETECTOR_PREFIX' is not defined
______ ERROR collecting test_logcollector/test_location/test_location.py _______
test_logcollector/test_location/test_location.py:187: in <module>
configurations = load_wazuh_configurations(configurations_path, __name__, params=parameters, metadata=metadata)
/usr/local/python-3.10/lib/python3.10/site-packages/wazuh_testing-4.6.0-py3.10.egg/wazuh_testing/tools/configuration.py:446: in load_wazuh_configurations
with open(yaml_file_path) as stream:
E FileNotFoundError: [Errno 2] No such file or directory: '/tmp/Test_integration_B41699_20230726122239/tests/integration/test_logcollector/test_location/data/configuration_template/configuration_loc
ation.yaml'
__ ERROR collecting test_logcollector/test_location/test_location_exclude.py ___
test_logcollector/test_location/test_location_exclude.py:187: in <module>
configurations = load_wazuh_configurations(configurations_path, __name__, params=parameters, metadata=metadata)
/usr/local/python-3.10/lib/python3.10/site-packages/wazuh_testing-4.6.0-py3.10.egg/wazuh_testing/tools/configuration.py:446: in load_wazuh_configurations
with open(yaml_file_path) as stream:
E FileNotFoundError: [Errno 2] No such file or directory: '/tmp/Test_integration_B41699_20230726122239/tests/integration/test_logcollector/test_location/data/configuration_template/configuration_loc
ation.yaml'
_ ERROR collecting test_logcollector/test_location/test_win_location_wildcards.py _
test_logcollector/test_location/test_win_location_wildcards.py:69: in <module>
configurations = load_configuration_template(configurations_path, configuration_parameters,
/usr/local/python-3.10/lib/python3.10/site-packages/wazuh_testing-4.6.0-py3.10.egg/wazuh_testing/tools/configuration.py:696: in load_configuration_template
configuration = file.read_yaml(data_file_path)
/usr/local/python-3.10/lib/python3.10/site-packages/wazuh_testing-4.6.0-py3.10.egg/wazuh_testing/tools/file.py:61: in read_yaml
with open(file_path) as f:
E FileNotFoundError: [Errno 2] No such file or directory: '/tmp/Test_integration_B41699_20230726122239/tests/integration/test_logcollector/test_location/data/configuration_template/configuration_win
_location_wildcards.yaml'
- generated html file: file:///tmp/Test_integration_B41699_20230726122239/report.html -
=========================== short test summary info ============================
ERROR test_logcollector/test_configuration/test_basic_configuration_ignore_binaries.py
ERROR test_logcollector/test_location/test_location.py - FileNotFoundError: [...
ERROR test_logcollector/test_location/test_location_exclude.py - FileNotFound...
ERROR test_logcollector/test_location/test_win_location_wildcards.py - FileNo...
!!!!!!!!!!!!!!!!!!! Interrupted: 4 errors during collection !!!!!!!!!!!!!!!!!!!!
======================= 97 deselected, 4 errors in 9.30s =======================
...integration/test_logcollector/test_configuration/test_basic_configuration_ignore_binaries.py
Show resolved
Hide resolved
jnasselle
approved these changes
Jul 27, 2023
juliamagan
approved these changes
Jul 27, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 test support for wildcards usage in the localfile
location
tag for Windows agents.Added
/test_logcollector/test_location_wildcards
suite. Testing different wildcards combinations and a case where wildcards do not match a valid fileTesting performed