Tests: Add a new user with a valid existing group as primary#1591
Open
aborah-sudo wants to merge 1 commit intoshadow-maint:masterfrom
Open
Tests: Add a new user with a valid existing group as primary#1591aborah-sudo wants to merge 1 commit intoshadow-maint:masterfrom
aborah-sudo wants to merge 1 commit intoshadow-maint:masterfrom
Conversation
ikerexxe
reviewed
Mar 17, 2026
Collaborator
ikerexxe
left a comment
There was a problem hiding this comment.
If I'm not mistaken this test already exists in bash intests/usertools/01/08_useradd_named_primary_group.test. Make sure to reference it in the commit message.
In addition, make sure to follow the accepted wording for the docstring
ikerexxe
reviewed
Mar 18, 2026
tests/system/tests/test_useradd.py
Outdated
| :steps: | ||
| 1. Create a group | ||
| 2. Create user with that group as primary | ||
| 3. Check user created successfully |
Collaborator
There was a problem hiding this comment.
I'd use Check passwd entry instead
tests/system/tests/test_useradd.py
Outdated
Comment on lines
+370
to
+371
| 1. Create a group | ||
| 2. Create user with that group as primary |
Collaborator
There was a problem hiding this comment.
You are missing a step in the middle: Check group entry and Group attributes are correct in expectedresults
This is the transformation to Python of the test located in `tests/usertools/01/08_useradd_named_primary_group.test`, which checks that `useradd` can add a new user with a valid existing group as primary
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 a new user with a valid existing group as primary with option -g