Skip to content

Tests: Clean sweep in logging suite#8512

Merged
danlavu merged 1 commit into
SSSD:masterfrom
jakub-vavra-cz:sweep_logging
Apr 7, 2026
Merged

Tests: Clean sweep in logging suite#8512
danlavu merged 1 commit into
SSSD:masterfrom
jakub-vavra-cz:sweep_logging

Conversation

@jakub-vavra-cz

Copy link
Copy Markdown
Contributor

Revisiting changes from #7891.

@alexey-tikhonov

Copy link
Copy Markdown
Member

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/tests/system/tests/test_logging.py Outdated
Comment thread src/tests/system/tests/test_logging.py
Comment thread src/tests/system/tests/test_logging.py Outdated
Comment thread src/tests/system/tests/test_logging.py
Comment thread src/tests/system/tests/test_logging.py Outdated
Comment thread src/tests/system/tests/test_logging.py Outdated
Comment thread src/tests/system/tests/test_logging.py
Comment thread src/tests/system/tests/test_logging.py Outdated
@alexey-tikhonov

Copy link
Copy Markdown
Member

In general looks good to me, a couple of remarks inline.

@danlavu danlavu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nitpicks, some comments, but overall, it's great, thank you.

Comment thread src/tests/system/tests/test_logging.py Outdated
Comment thread src/tests/system/tests/test_logging.py Outdated
Comment thread src/tests/system/tests/test_logging.py
Comment thread src/tests/system/tests/test_logging.py
Comment thread src/tests/system/tests/test_logging.py Outdated
Comment thread src/tests/system/tests/test_logging.py Outdated
Comment thread src/tests/system/tests/test_logging.py
Comment thread src/tests/system/tests/test_logging.py Outdated
@alexey-tikhonov

Copy link
Copy Markdown
Member

'Changes requested' based on @danlavu comments.

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.

@danlavu danlavu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

Comment thread src/tests/system/tests/test_logging.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants