Skip to content

[autobackport: sssd-2-10] Tests: Add integration tests validating SSSD socket#8562

Merged
alexey-tikhonov merged 1 commit intoSSSD:sssd-2-10from
sssd-bot:SSSD-sssd-backport-pr8481-to-sssd-2-10
Apr 10, 2026
Merged

[autobackport: sssd-2-10] Tests: Add integration tests validating SSSD socket#8562
alexey-tikhonov merged 1 commit intoSSSD:sssd-2-10from
sssd-bot:SSSD-sssd-backport-pr8481-to-sssd-2-10

Conversation

@sssd-bot
Copy link
Copy Markdown
Contributor

This is an automatic backport of PR#8481 Tests: Add integration tests validating SSSD socket to branch sssd-2-10, created by @aborah-sudo.

Please make sure this backport is correct.

Note

The commits were cherry-picked without conflicts.

You can push changes to this pull request

git remote add sssd-bot git@github.com:sssd-bot/sssd.git
git fetch sssd-bot refs/heads/SSSD-sssd-backport-pr8481-to-sssd-2-10
git checkout SSSD-sssd-backport-pr8481-to-sssd-2-10
git push sssd-bot SSSD-sssd-backport-pr8481-to-sssd-2-10 --force

Original commits
abee6e7 - Tests: Add integration tests validating SSSD socket

Backported commits

  • 1f3a7ab - Tests: Add integration tests validating SSSD socket

Original Pull Request Body

Add integration tests validating SSSD socket activation behavior for individual responders and mixed socket/traditional configurations.

Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new suite of system tests for SSSD socket activation, covering responder lifecycles, autofs support, mixed-mode configurations, and configuration conflicts. The review feedback correctly identifies that while the test docstrings claim to verify that services are initially inactive, the actual implementation lacks these assertions. Actionable suggestions were provided to add checks ensuring service units are not running before the first client request is made.

socket_unit = f"sssd-{responder}.socket"
service_unit = f"sssd-{responder}.service"

assert client.sssd.svc.is_active(socket_unit), f"{responder} socket should be active"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The test's docstring states that it verifies that the service unit is inactive initially. However, this crucial assertion is missing. To properly test the socket activation lifecycle, please add a check to confirm the service is not running before the first client request is made.

Suggested change
assert client.sssd.svc.is_active(socket_unit), f"{responder} socket should be active"
assert client.sssd.svc.is_active(socket_unit), f"{responder} socket should be active"
assert not client.sssd.svc.is_active(service_unit), f"{responder} service should be inactive initially"

socket_unit = f"sssd-{responder}.socket"
service_unit = f"sssd-{responder}.service"

assert client.sssd.svc.is_active(socket_unit), f"{responder} socket should be active"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Similar to the other lifecycle tests, this one is missing an assertion to verify that the autofs service unit is inactive before the first request. The test's docstring indicates this check should be performed. Please add it to ensure the test correctly validates the socket activation behavior.

Suggested change
assert client.sssd.svc.is_active(socket_unit), f"{responder} socket should be active"
assert client.sssd.svc.is_active(socket_unit), f"{responder} socket should be active"
assert not client.sssd.svc.is_active(service_unit), f"{responder} service should be inactive initially"

Comment thread src/tests/system/tests/test_socket.py
@alexey-tikhonov alexey-tikhonov removed the request for review from jakub-vavra-cz April 10, 2026 12:17
@alexey-tikhonov alexey-tikhonov added no-backport This should go to target branch only. Accepted labels Apr 10, 2026
Add integration tests validating SSSD socket activation behavior
for individual responders and mixed socket/traditional configurations.

Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
Reviewed-by: Jakub Vávra <jvavra@redhat.com>
(cherry picked from commit abee6e7)
@sssd-bot
Copy link
Copy Markdown
Contributor Author

The pull request was accepted by @alexey-tikhonov with the following PR CI status:


🟢 CodeQL (success)
🟢 rpm-build:centos-stream-10-x86_64:upstream (success)
🟢 ci / prepare (success)
🟢 ci / system (centos-10) (success)
🟢 Static code analysis / codeql (success)
🟢 Static code analysis / pre-commit (success)
🟢 Static code analysis / python-system-tests (success)


There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging.

@sssd-bot sssd-bot force-pushed the SSSD-sssd-backport-pr8481-to-sssd-2-10 branch from 1f3a7ab to 7d8b543 Compare April 10, 2026 12:18
@alexey-tikhonov alexey-tikhonov merged commit 9114ef7 into SSSD:sssd-2-10 Apr 10, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accepted no-backport This should go to target branch only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants