debian/tests: Cherry-pick part of autopkgtest from Ubuntu

Thanks: Michael Vogt for the more extensive suite in Ubuntu
This commit is contained in:
Balint Reczey
2022-01-22 21:53:25 +01:00
parent 600860fd1b
commit efb3723826
2 changed files with 15 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
Tests: smoke
Restrictions: needs-root
Vendored Executable
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
set -e
echo "Adding an user works"
useradd shadow-test-user
grep '^shadow-test-user:x:' /etc/passwd
grep '^shadow-test-user:!:' /etc/shadow
echo "Removing an user works"
userdel shadow-test-user
! grep 'shadow-test-user' /etc/passwd
! grep 'shadow-test-user' /etc/shadow