Skip to content

[autobackport: sssd-2-9] tests: Add netgroup offline and nested hierarchy#8303

Merged
thalman merged 1 commit intoSSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr8272-to-sssd-2-9
Dec 17, 2025
Merged

[autobackport: sssd-2-9] tests: Add netgroup offline and nested hierarchy#8303
thalman merged 1 commit intoSSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr8272-to-sssd-2-9

Conversation

@sssd-bot
Copy link
Contributor

This is an automatic backport of PR#8272 tests: Add netgroup offline and nested hierarchy to branch sssd-2-9, created by @madhuriupadhye.

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-pr8272-to-sssd-2-9
git checkout SSSD-sssd-backport-pr8272-to-sssd-2-9
git push sssd-bot SSSD-sssd-backport-pr8272-to-sssd-2-9 --force

Original commits
2b43681 - tests: Add netgroup offline and nested hierarchy

Backported commits

  • 4639927 - tests: Add netgroup offline and nested hierarchy

Original Pull Request Body

Add netgroup tests for offline mode, hierarchy removal, and nested modifications

Add new system tests for netgroup functionality:

  • test_netgroup__offline: Verify netgroups remain accessible from cache when backend goes offline
  • test_netgroups__step_by_step_removal: Test removing netgroups from hierarchy and deleting them with proper cache invalidation
  • test_netgroups__nested_modification: Test that adding/removing members in nested netgroups (3-level deep) propagates correctly through the hierarchy
    Related: https://fedorahosted.org/sssd/ticket/2841

Copy link

@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 adds three new system tests for SSSD's netgroup functionality, covering offline access, step-by-step hierarchy removal, and nested modifications. The tests are well-structured and documented. My review focuses on improving the robustness and correctness of the assertions for netgroup members. The current assertions have a few issues: they use a potentially incorrect string format for netgroup triples (with spaces and sometimes missing trailing commas), and they perform member checks in a way that is less robust than a set comparison. I've provided suggestions to use set comparisons on stringified members, which makes the tests more accurate and consistent with other tests in the file.

Add new system tests for netgroup functionality:

- test_netgroup__offline: Verify netgroups remain
	accessible from cache when backend goes offline
- test_netgroups__step_by_step_removal: Test removing
	netgroups from hierarchy and deleting them with proper cache invalidation
- test_netgroups__nested_modification: Test that adding/removing
	members in nested netgroups (3-level deep) propagates correctly through the hierarchy
	Related: https://fedorahosted.org/sssd/ticket/2841

Signed-off-by: Madhuri Upadhye <mupadhye@redhat.com>
Reviewed-by: Jakub Vávra <jvavra@redhat.com>
Reviewed-by: Tomáš Halman <thalman@redhat.com>
(cherry picked from commit 2b43681)
@sssd-bot
Copy link
Contributor Author

The pull request was accepted by @thalman with the following PR CI status:


🟢 CodeQL (success)
🟢 rpm-build:centos-stream-9-x86_64:upstream (success)
🟢 ci / prepare (success)
🟢 ci / system (centos-9) (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-pr8272-to-sssd-2-9 branch from 4639927 to 7d2e936 Compare December 17, 2025 10:22
@thalman thalman merged commit 6139618 into SSSD:sssd-2-9 Dec 17, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants