summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorBalint Reczey <balint@balintreczey.hu>2022-01-22 20:25:32 +0100
committerBalint Reczey <balint@balintreczey.hu>2022-01-22 21:53:25 +0100
commitefb3723826bb540a6aab19a8ee56c71540d7844c (patch)
treed11e25c348183dab50921fe5f3be554f93a4e330 /debian
parent600860fd1b21acde3633262cb166a9013ff02139 (diff)
downloadshadow-efb3723826bb540a6aab19a8ee56c71540d7844c.tar.gz
debian/tests: Cherry-pick part of autopkgtest from Ubuntu
Thanks: Michael Vogt for the more extensive suite in Ubuntu
Diffstat (limited to 'debian')
-rw-r--r--debian/tests/control2
-rwxr-xr-xdebian/tests/smoke13
2 files changed, 15 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 00000000..86a9b63e
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: smoke
+Restrictions: needs-root
diff --git a/debian/tests/smoke b/debian/tests/smoke
new file mode 100755
index 00000000..69bbfb0c
--- /dev/null
+++ b/debian/tests/smoke
@@ -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