Skip to content

Tests: Add system tests for groupadd in test_groupadd.py - #1693

Merged
ikerexxe merged 4 commits into
shadow-maint:masterfrom
asakure:system_tests_groupadd_22_23_24
Aug 31, 2026
Merged

Tests: Add system tests for groupadd in test_groupadd.py#1693
ikerexxe merged 4 commits into
shadow-maint:masterfrom
asakure:system_tests_groupadd_22_23_24

Conversation

@asakure

@asakure asakure commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Add system tests for groupadd in test_groupadd.py for
existing bash tests with numbering 22, 23, 24.

@asakure
asakure marked this pull request as ready for review July 23, 2026 15:01
@asakure
asakure force-pushed the system_tests_groupadd_22_23_24 branch from cbb8850 to d010ea7 Compare August 26, 2026 06:02
Comment thread tests/system/tests/test_groupadd.py
Comment thread tests/system/framework/roles/shadow.py Outdated
Comment thread tests/system/tests/test_groupadd.py Outdated
@asakure
asakure force-pushed the system_tests_groupadd_22_23_24 branch 3 times, most recently from 8b0a946 to 0c8cf07 Compare August 27, 2026 08:28
Comment thread tests/system/tests/test_groupadd.py Outdated
Comment thread tests/system/framework/roles/shadow.py Outdated
Comment thread tests/system/tests/test_groupadd.py Outdated
Comment thread tests/system/tests/test_groupadd.py Outdated
Comment thread tests/system/tests/test_groupadd.py
Comment thread tests/system/tests/test_groupadd.py Outdated
Comment thread tests/system/tests/test_groupadd.py Outdated
Comment thread tests/system/tests/test_groupadd.py
Comment thread tests/system/tests/test_groupadd.py Outdated
Comment thread tests/system/tests/test_groupadd.py Outdated
This is Python transformation of the test located in
`tests/grouptools/groupadd/22_groupadd_usage/groupadd.test`
which checks that `groupadd` command shows usage with -h option.

Signed-off-by: Akshay Sakure <asakure@redhat.com>
@asakure
asakure force-pushed the system_tests_groupadd_22_23_24 branch from 0c8cf07 to e632b96 Compare August 27, 2026 15:04
This patch fixes the issue in shadow.py file to handle
empty or missing arguments in _parse_args and groupadd
so shadow.groupadd() does not raise TypeError or IndexError.

Signed-off-by: Akshay Sakure <asakure@redhat.com>
This is Python transformation of the test located in
`tests/grouptools/groupadd/23_groupadd_no_groups/groupadd.test`
which checks that `groupadd` fails when no groupname is
mentioned.

Signed-off-by: Akshay Sakure <asakure@redhat.com>
This is Python transformation of the test located in
`tests/grouptools/groupadd/24_groupadd_2_groups/groupadd.test`
which checks that `groupadd` command fails when two groupnames
are mentioned. It also parametrize python tests 23 and 24 into
single test.

Signed-off-by: Akshay Sakure <asakure@redhat.com>
@asakure
asakure force-pushed the system_tests_groupadd_22_23_24 branch from e632b96 to f137f8b Compare August 31, 2026 09:06

@ikerexxe ikerexxe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@ikerexxe
ikerexxe merged commit 92bb6f2 into shadow-maint:master Aug 31, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants