-
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 logcollector ignore and restrict IT tests #3582
Conversation
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.
I requested some changes. Also, I would like to know what happens when we add only two ignore tags or two restrict tags in the same configuration.
Ignore tag works as OR
, and restrict tag works as AND
, but I didn't see any cases of this added. Was it for some reason?
tests/integration/test_logcollector/test_log_filter_options/test_ignore_regex.py
Outdated
Show resolved
Hide resolved
tests/integration/test_logcollector/test_log_filter_options/test_ignore_regex.py
Outdated
Show resolved
Hide resolved
tests/integration/test_logcollector/test_log_filter_options/test_ignore_regex.py
Outdated
Show resolved
Hide resolved
tests/integration/test_logcollector/test_log_filter_options/test_ignore_regex.py
Outdated
Show resolved
Hide resolved
tests/integration/test_logcollector/test_log_filter_options/test_restrict_regex.py
Outdated
Show resolved
Hide resolved
...logcollector/test_log_filter_options/data/test_cases/cases_restrict_ignore_regex_values.yaml
Outdated
Show resolved
Hide resolved
...logcollector/test_log_filter_options/data/test_cases/cases_restrict_ignore_regex_values.yaml
Outdated
Show resolved
Hide resolved
...logcollector/test_log_filter_options/data/test_cases/cases_restrict_ignore_regex_values.yaml
Outdated
Show resolved
Hide resolved
...logcollector/test_log_filter_options/data/test_cases/cases_restrict_ignore_regex_values.yaml
Outdated
Show resolved
Hide resolved
...logcollector/test_log_filter_options/data/test_cases/cases_restrict_ignore_regex_values.yaml
Outdated
Show resolved
Hide resolved
Changes: - Added ansible structure to QA's repo - Added two new roles: `apache` and `qa_framework` roles - `customize` flag has been added to `qa_framework` role: by setting this as true, we can customize any var within all hosts `apache` role works on all systems but in Solaris and macOS it freezes during the Apache installation.
tests/integration/test_logcollector/test_log_filter_options/test_restrict_ignore_regex.py
Outdated
Show resolved
Hide resolved
tests/integration/test_logcollector/test_log_filter_options/test_ignore_regex.py
Outdated
Show resolved
Hide resolved
tests/integration/test_logcollector/test_log_filter_options/test_restrict_regex.py
Outdated
Show resolved
Hide resolved
tests/integration/test_logcollector/test_log_filter_options/test_restrict_regex.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Dámaris <[email protected]>
a56fc8f
to
b195b8b
Compare
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.
As we comment in the review call, you have to study if you can suppress some configuration templates or test use cases, for getting better performance or avoiding duplicated or unnecessary cases.
Description
This PR aims to add new tests to the logcollector integration test suite related to the new
restrict
andignore
options. When adding this options to alocation
tag, incoming logs will be ignored and not set for analysis if they do not match a configured restrict tag or if they match a configured ignore tag. The new options allow for 3 different regex engines to match the logs (PCRE2, osregex and osmatch).This PR adds a total of 48 new test cases. All tests have been added to
test_logcollector/test_options
suite.Added
test_ignore_regex
module adds 12 test cases for ignore tag, with default and type value configured.test_restrict_regex
module adds 12 test cases for restrict tag, with default and type value configured.test_restrict_ignore_regex
module adds 24 test cases with one ignore and one restrict tag, with different combination of regex types and matching either one of the tags, none, or both.Testing performed