]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Revert "tests/: extend basic userdel test"
authorSerge Hallyn <serge@hallyn.com>
Thu, 22 May 2025 11:27:11 +0000 (06:27 -0500)
committerGitHub <noreply@github.com>
Thu, 22 May 2025 11:27:11 +0000 (06:27 -0500)
This reverts commit 174103cb9497d6a2e3808ab0955c6f1dbf5599d6.

tests/system/tests/test_userdel.py

index 78c6bb361c5ed0b732516aff1fc21c324eb1e5b5..c92b645c5419968d32577e922c8e939c3718f42d 100644 (file)
@@ -18,32 +18,22 @@ def test_userdel__homedir_removed(shadow: Shadow):
         1. Create user
         2. Delete the user and the homedir
     :steps:
-        1. Check passwd entry
-        2. Check shadow entry
-        3. Check group entry
-        4. Check gshadow entry
-        5. Check home folder
+        1. User doesn't exist
+        2. Group doesn't exist
+        3. Home folder doesn't exist
     :expectedresults:
-        1. passwd entry for the user doesn't exist
-        2. shadow entry for the user doesn't exist
-        3. group entry for the user doesn't exist
-        4. gshadow entry for the user doesn't exist
-        5. Home folder doesn't exist
+        1. User is not found
+        2. Group is not found
+        3. Home folder is not found
     :customerscenario: False
     """
     shadow.useradd("tuser")
     shadow.userdel("-r tuser")
 
-    result = shadow.tools.getent.passwd("tuser")
-    assert result is None, "User should not be found"
-
-    result = shadow.tools.getent.shadow("tuser")
+    result = shadow.tools.id("tuser")
     assert result is None, "User should not be found"
 
     result = shadow.tools.getent.group("tuser")
     assert result is None, "Group should not be found"
 
-    result = shadow.tools.getent.gshadow("tuser1")
-    assert result is None, "User should not be found"
-
     assert not shadow.fs.exists("/home/tuser"), "Home folder should not exist"