[autobackport: sssd-2-9] tests: Add incomplete triples and complex hierarchy netgroup tests#8281
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces several new tests for netgroups, but the automatic backport process has resulted in multiple unresolved merge conflicts within src/tests/system/tests/test_netgroups.py. These conflicts are critical and prevent the code from being functional or reviewable. I have marked the locations of the conflicts. Please resolve them before this pull request can be merged.
|
@madhuriupadhye you should amend the commits instead of creating a new one to tackle the conflicts |
And a commit message(s). |
a1b216f to
4aec2b5
Compare
fixed. |
ikerexxe
left a comment
There was a problem hiding this comment.
There are still a set of conflicts present in commit 1, please remove them there
|
4aec2b5 to
236f84e
Compare
fixed. Request to check again. |
Add new test cases to verify netgroup functionality with incomplete triples and complex nested hierarchies. New tests: - test_netgroup__incomplete_triples: Verify netgroups with various incomplete triple combinations (empty, only host, only user, only domain, missing host, missing user, missing domain) - test_netgroups__complex_hierarchy: Verify netgroups with multiple levels of nesting (base -> mid -> top) work correctly and return the expected combination of direct triples and inherited members Signed-off-by: Madhuri Upadhye <mupadhye@redhat.com> Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com> Reviewed-by: Jakub Vávra <jvavra@redhat.com> (cherry picked from commit 63771a1)
Replace hardcoded "ldap.test" domain strings with dynamic `provider.domain`
and fix type checking errors in netgroup tests.
Changes:
- Remove `raise ValueError` and `pytest.skip` isinstance checks since
topology markers already restrict tests to LDAP, AD, and Samba providers
- Change function signatures from `GenericProvider` to `AD | LDAP | Samba`
to match the topology decorators
- Replace all hardcoded "ldap.test" with `provider.domain` for dynamic
domain resolution across different provider topologies
- Rework parametrized test to use boolean flag and format string with
`{domain}` placeholder for runtime substitution
- Fix type errors by passing netgroup names as strings instead of objects
to `add_member(ng=...)` calls
- Fix type conflict by using separate variable names (`passwd_result`,
`group_result`) for different entry types
Affected tests:
- test_netgroup__user_attribute_membernisnetgroup_uses_group_dn
- test_netgroup__lookup_nested_groups
- test_netgroup__lookup_nested_groups_with_host_and_domain_values_present
- test_netgroup__uid_gt_2147483647
Signed-off-by: Madhuri Upadhye <mupadhye@redhat.com>
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
Reviewed-by: Jakub Vávra <jvavra@redhat.com>
(cherry picked from commit 90fd802)
|
The pull request was accepted by @jakub-vavra-cz with the following PR CI status: 🟢 CodeQL (success) There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging. |
236f84e to
ef76d57
Compare
This is an automatic backport of PR#8262 tests: Add incomplete triples and complex hierarchy netgroup tests to branch sssd-2-9, created by @madhuriupadhye.
Caution
@madhuriupadhye The patches did not apply cleanly. It is necessary to resolve conflicts before merging this pull request. Commits that introduced conflict are marked with
CONFLICT!.You can push changes to this pull request
Original commits
90fd802 - tests: Remove hardcoded domain and fix type errors in netgroup tests
63771a1 - tests: Add netgroup tests for incomplete triples and complex hierarchy
Backported commits
Conflicting Files Information (check for deleted and re-added files)
On branch SSSD-sssd-backport-pr8262-to-sssd-2-9
You are currently cherry-picking commit 63771a1.
(fix conflicts and run "git cherry-pick --continue")
(use "git cherry-pick --skip" to skip this patch)
(use "git cherry-pick --abort" to cancel the cherry-pick operation)
Unmerged paths:
(use "git add ..." to mark resolution)
both modified: src/tests/system/tests/test_netgroups.py
no changes added to commit (use "git add" and/or "git commit -a")