-
Notifications
You must be signed in to change notification settings - Fork 375
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
suppress systemd errors in e2e tests #3292
Conversation
tests_e2e/tests/lib/agent_log.py
Outdated
@@ -454,7 +476,7 @@ def matches_ignore_rule(record: AgentLogRecord, ignore_rules: List[Dict[str, Any | |||
""" | |||
Returns True if the given 'record' matches any of the 'ignore_rules' | |||
""" | |||
return any(re.search(rule['message'], record.message) is not None and ('if' not in rule or rule['if'](record)) for rule in ignore_rules) | |||
return any(re.search(rule['message'], record.message, flags=re.DOTALL) is not None and ('if' not in rule or rule['if'](record)) for rule in ignore_rules) |
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.
we should not do this for all rules (or if we do, we need to go back and review very carefully all the existing rules and associated messages).
you can do this exlplicitly at the regex level, as in
'message': r"(?s)name=Microsoft.GuestConfiguration.ConfigurationforLinux.*op=Install.*Unexpected Linux distribution"
regex starts with (?s)
f263ad6
to
60f5f46
Compare
* ingonre systemd errors * addressing comment (cherry picked from commit 844c0a6)
Description
suppress systemd errors in e2e tests
Issue #
PR information
develop
branch.Quality of Code and Contribution Guidelines