]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
tests/: extend basic groupdel tests
authorIker Pedrosa <ipedrosa@redhat.com>
Wed, 12 Mar 2025 08:19:44 +0000 (09:19 +0100)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Wed, 21 May 2025 08:04:42 +0000 (10:04 +0200)
Add additional check for gshadow entry.

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Reviewed-by: Dan Lavu <dlavu@redhat.com>
tests/system/tests/test_groupdel.py

index 90684ac027a36c6ee87e662ffdaff110af5c7081..c2ac2a2ccc8992f821d2672b6a1c1f91a349c721 100644 (file)
@@ -18,9 +18,11 @@ def test_groupdel__delete_group(shadow: Shadow):
         1. Create group
         2. Delete group
     :steps:
-        1. Group doesn't exist
+        1. Check group entry
+        2. Check gshadow entry
     :expectedresults:
-        1. Group is not found
+        1. group entry for the user doesn't exist
+        2. gshadow entry for the user doesn't exist
     :customerscenario: False
     """
     shadow.groupadd("tgroup")
@@ -28,3 +30,6 @@ def test_groupdel__delete_group(shadow: Shadow):
 
     result = shadow.tools.getent.group("tgroup")
     assert result is None, "Group should not be found"
+
+    result = shadow.tools.getent.gshadow("tgroup")
+    assert result is None, "Group should not be found"