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 20:25:32 +01:00
parent 600860fd1b
commit efb3723826
2 changed files with 15 additions and 0 deletions

2
debian/tests/control vendored Normal file
View File

@@ -0,0 +1,2 @@
Tests: smoke
Restrictions: needs-root

13
debian/tests/smoke vendored Executable file
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