Tests: Clean sweep in logging suite#8512
Conversation
136163d to
8a09651
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
The pull request primarily refactors and expands SSSD logging tests. It clarifies documentation regarding default debug levels, renames several existing tests for better readability, and introduces new tests to verify that configured domain debug levels are honored and that debug levels can be changed at runtime using sssctl. Additionally, it improves existing tests for domain configuration errors and offline scenarios by making assertions more precise and including checks for syslog messages. A review comment highlights an inaccuracy in a test's docstring regarding the expected debug level, which should be updated to reflect the correct cumulative bitmask.
8a09651 to
2f64763
Compare
| @pytest.mark.importance("low") | ||
| @pytest.mark.topology(KnownTopologyGroup.AnyProvider) | ||
| @pytest.mark.skip(reason="There are some error messages that need to have log level increased.") | ||
| def test_logging__user_logins_are_not_written_to_logs(client: Client, provider: GenericProvider): |
There was a problem hiding this comment.
What is the convention: '_' or '__'?
Above you used
test_logging_debug_level_is_written_to_logs
-- single '_'
There was a problem hiding this comment.
As I undestand it, before "__" is common prefix denoting test area that can be used to select tests instead of having many (outdated) pytest markes.
There was a problem hiding this comment.
Why then test_logging__user_logins_are_not_written_to_logs but test_logging_debug_level_is_written_to_logs?
|
In general looks good to me, a couple of remarks inline. |
Merged tests for sssd offline message in logs and syslog. Split backend offline(unreachable) and dns resolution error scenario. Check that user login does not generate logs on default debug level extended to all providers. Added link to debug level documentation. Dropped references to (now-irrelevant) bugzillas in rewritten tests. Skipping test_logging__user_logins_are_not_written_to_logs as updating log level of the messages is low priority.
2f64763 to
46a098f
Compare
Revisiting changes from #7891.