]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
tests: update vipw tests to expect ID 1001
authorIker Pedrosa <ipedrosa@redhat.com>
Tue, 14 Apr 2026 11:28:56 +0000 (13:28 +0200)
committerSerge Hallyn <serge@hallyn.com>
Tue, 28 Apr 2026 13:17:39 +0000 (08:17 -0500)
Update test assertions to expect ID 1001 instead of 1000 to match
the new container environment where a CI user occupies ID 1000.

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
tests/system/tests/test_vipw.py

index 28cfe2e9d5bd96fd30407df7681f6a23313d0fef..c962d4c3da1fa4fbe4b3e823083e2856d1082981 100644 (file)
@@ -23,15 +23,15 @@ def test_vipw__add_user_to_passwd(shadow: Shadow):
         2. User's passwd entry is correct
     :customerscenario: False
     """
-    editor_script = "Go\ntuser:x:1000:1000::/home/tuser:/bin/bash\n:wq"
+    editor_script = "Go\ntuser:x:1001:1001::/home/tuser:/bin/bash\n:wq"
     shadow.vipw(editor_script=editor_script)
 
     passwd_entry = shadow.tools.getent.passwd("tuser")
     assert passwd_entry is not None, "User should be found"
     assert passwd_entry.name == "tuser", "Incorrect username"
     assert passwd_entry.password == "x", "Incorrect password"
-    assert passwd_entry.uid == 1000, "Incorrect UID"
-    assert passwd_entry.gid == 1000, "Incorrect GID"
+    assert passwd_entry.uid == 1001, "Incorrect UID"
+    assert passwd_entry.gid == 1001, "Incorrect GID"
     assert passwd_entry.home == "/home/tuser", "Incorrect home"
     assert passwd_entry.shell == "/bin/bash", "Incorrect shell"
 
@@ -76,13 +76,13 @@ def test_vipw__add_group_to_group(shadow: Shadow):
         2. Group's shadow group is correct
     :customerscenario: False
     """
-    editor_script = "Go\ntgroup:x:1000:\n:wq"
+    editor_script = "Go\ntgroup:x:1001:\n:wq"
     shadow.vipw("-g", editor_script=editor_script)
 
     group_entry = shadow.tools.getent.group("tgroup")
     assert group_entry is not None, "Group should be found"
     assert group_entry.name == "tgroup", "Incorrect groupname"
-    assert group_entry.gid == 1000, "Incorrect GID"
+    assert group_entry.gid == 1001, "Incorrect GID"
 
 
 @pytest.mark.topology(KnownTopology.Shadow)