Tests: Add system tests for groupadd in test_groupadd.py - #1669
Open
asakure wants to merge 2 commits into
Open
Conversation
asakure
force-pushed
the
system_tests_groupadd_12_13
branch
3 times, most recently
from
July 9, 2026 08:43
f8a7f20 to
ffe99ca
Compare
asakure
marked this pull request as draft
July 9, 2026 08:45
asakure
force-pushed
the
system_tests_groupadd_12_13
branch
2 times, most recently
from
July 20, 2026 10:05
c1d5b6b to
b40e14e
Compare
asakure
marked this pull request as ready for review
July 21, 2026 08:29
ikerexxe
reviewed
Jul 21, 2026
ikerexxe
left a comment
Collaborator
There was a problem hiding this comment.
Just some minor thing to improve
asakure
force-pushed
the
system_tests_groupadd_12_13
branch
from
July 21, 2026 12:25
b40e14e to
b363680
Compare
asakure
force-pushed
the
system_tests_groupadd_12_13
branch
2 times, most recently
from
July 30, 2026 14:08
8a771b1 to
e80a7b5
Compare
ikerexxe
reviewed
Jul 30, 2026
ikerexxe
left a comment
Collaborator
There was a problem hiding this comment.
I just noticed that test 11 and 12 check the GID, while test 13 checks the group name. I'd prefer to keep those separated. Sorry for the confusion.
|
|
||
|
|
||
| @pytest.mark.topology(KnownTopology.Shadow) | ||
| def test_groupadd__invalid_gid(shadow: Shadow): |
Collaborator
There was a problem hiding this comment.
I'd keep the original name
Comment on lines
+242
to
+243
| pytest.param("-g 1001x tgroup", "tgroup", id="invalid_gid"), | ||
| pytest.param("-g -1001 tgroup", "tgroup", id="negative_gid"), |
Collaborator
There was a problem hiding this comment.
For the first argument you should only parametrize the GID (i.e. 1001x, -1001). You don't need to parametrize the second argument, it's always tgroup. The third argument is fine
This is Python transformation of the test located in `tests/grouptools/groupadd/12_groupadd_negative_GID/groupadd.test` which checks that `groupadd` fails to create group with invalid GID using -g flag. It also converts Bash tests 11 and 12 into a single parametrized Python test. Signed-off-by: Akshay Sakure <asakure@redhat.com>
This is Python transformation of the test located in `tests/grouptools/groupadd/13_groupadd_invalid_name/groupadd.test` which checks that `groupadd` fails to create group when invalid name is specified. Signed-off-by: Akshay Sakure <asakure@redhat.com>
asakure
force-pushed
the
system_tests_groupadd_12_13
branch
from
July 30, 2026 17:20
e80a7b5 to
aa350e2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add system tests for groupadd in test_groupadd.py for
existing bash tests with numbering 12, 13.