Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/system/tests/test_groupadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,16 @@ def test_groupadd__force_group_creation(shadow: Shadow):
:customerscenario: False
"""
shadow.groupadd("tgroup")

existing_group_entry = shadow.tools.getent.group("tgroup")
assert existing_group_entry is not None, "Group should be found"

shadow.groupadd("-f tgroup")

group_entry = shadow.tools.getent.group("tgroup")
assert group_entry is not None, "Group should be found"
assert group_entry.name == "tgroup", "Incorrect groupname"

if shadow.host.features["gshadow"]:
gshadow_entry = shadow.tools.getent.gshadow("tgroup")
assert gshadow_entry is not None, "Group should be found"
Expand Down
Loading