[Pkg-shadow-commits] r1078 - trunk/tests/usertools/01
Nicolas FRANCOIS
nekral-guest at costa.debian.org
Sun Aug 6 17:21:09 UTC 2006
Author: nekral-guest
Date: 2006-08-06 17:21:08 +0000 (Sun, 06 Aug 2006)
New Revision: 1078
Modified:
trunk/tests/usertools/01/run10
trunk/tests/usertools/01/run11
trunk/tests/usertools/01/run5
trunk/tests/usertools/01/run6
trunk/tests/usertools/01/run7
trunk/tests/usertools/01/run8
trunk/tests/usertools/01/run9
Log:
Simplify the tests (some actions were tested twice, e.g. deleting users), and
update the rationals in the headers.
Modified: trunk/tests/usertools/01/run10
===================================================================
--- trunk/tests/usertools/01/run10 2006-08-06 14:57:49 UTC (rev 1077)
+++ trunk/tests/usertools/01/run10 2006-08-06 17:21:08 UTC (rev 1078)
@@ -5,7 +5,7 @@
cd $(dirname $0)
# Rational:
-# Test that usermod can rename a user.
+# Check that usermod can rename an user
save()
{
Modified: trunk/tests/usertools/01/run11
===================================================================
--- trunk/tests/usertools/01/run11 2006-08-06 14:57:49 UTC (rev 1077)
+++ trunk/tests/usertools/01/run11 2006-08-06 17:21:08 UTC (rev 1078)
@@ -5,7 +5,7 @@
cd $(dirname $0)
# Rational:
-# Test that useradd can add an user, usermod can change it
+# Check that usermod can change, lock or unlock an user's password
save()
{
Modified: trunk/tests/usertools/01/run5
===================================================================
--- trunk/tests/usertools/01/run5 2006-08-06 14:57:49 UTC (rev 1077)
+++ trunk/tests/usertools/01/run5 2006-08-06 17:21:08 UTC (rev 1078)
@@ -5,9 +5,8 @@
cd $(dirname $0)
# Rational:
-# Test useradd -g
-# It must reject negative GID
-# accept textual and numerical groups
+# Test useradd -g rejects negative GID
+# (In fact useradd fall back to a textual match)
save()
{
@@ -43,7 +42,7 @@
################################################################################
echo -n "Create user test1 in the non existent group -1..."
-msg=$(useradd test1 -g -1 2>&1) && echo "should have failed" || test "$?" = "6"
+msg=$(useradd test1 -g -1 2>&1) && exit 1 || test "$?" = "6"
test "$msg" = "useradd: unknown group -1"
echo "OK"
Modified: trunk/tests/usertools/01/run6
===================================================================
--- trunk/tests/usertools/01/run6 2006-08-06 14:57:49 UTC (rev 1077)
+++ trunk/tests/usertools/01/run6 2006-08-06 17:21:08 UTC (rev 1078)
@@ -5,9 +5,7 @@
cd $(dirname $0)
# Rational:
-# Test useradd -g
-# It must reject negative GID
-# accept textual and numerical groups
+# Test useradd -g checks that the given group exists
save()
{
@@ -43,6 +41,6 @@
################################################################################
echo -n "Create user test2 in the non existent group nekral..."
-msg=$(useradd test2 -g nekral 2>&1) && echo "should have failed" || test "$?" = "6"
+msg=$(useradd test2 -g nekral 2>&1) && exit 1 || test "$?" = "6"
test "$msg" = "useradd: unknown group nekral"
echo "OK"
Modified: trunk/tests/usertools/01/run7
===================================================================
--- trunk/tests/usertools/01/run7 2006-08-06 14:57:49 UTC (rev 1077)
+++ trunk/tests/usertools/01/run7 2006-08-06 17:21:08 UTC (rev 1078)
@@ -5,9 +5,7 @@
cd $(dirname $0)
# Rational:
-# Test useradd -g
-# It must reject negative GID
-# accept textual and numerical groups
+# Test useradd -g accepts numerical groups
save()
{
@@ -79,26 +77,3 @@
echo -n "."
echo " OK"
-echo -n "delete this user..."
-userdel test3
-echo "OK"
-
-echo "check if the user was deleted"
-echo -n " no entries..."
-egrep "^test3:" \
- /etc/passwd /etc/group /etc/shadow /etc/gshadow && exit 1 || true
-echo " OK"
-echo -n " no homedir..."
-test -d /home/test3 && exit 1 || true
-echo " OK"
-echo -n " number of lines"
-test $lines_passwd = $(wc -l /etc/passwd | cut -f1 -d" ")
-echo -n "."
-test $lines_group = $(wc -l /etc/group | cut -f1 -d" ")
-echo -n "."
-test $lines_shadow = $(wc -l /etc/shadow | cut -f1 -d" ")
-echo -n "."
-test $lines_gshadow = $(wc -l /etc/gshadow | cut -f1 -d" ")
-echo -n "."
-echo " OK"
-
Modified: trunk/tests/usertools/01/run8
===================================================================
--- trunk/tests/usertools/01/run8 2006-08-06 14:57:49 UTC (rev 1077)
+++ trunk/tests/usertools/01/run8 2006-08-06 17:21:08 UTC (rev 1078)
@@ -5,9 +5,7 @@
cd $(dirname $0)
# Rational:
-# Test useradd -g
-# It must reject negative GID
-# accept textual and numerical groups
+# Test useradd -g accepts textual groups
save()
{
@@ -85,26 +83,3 @@
echo -n "."
echo " OK"
-echo -n "delete this user..."
-userdel test4
-echo "OK"
-
-echo "check if the user was deleted"
-echo -n " no entries..."
-egrep "^test4:" \
- /etc/passwd /etc/group /etc/shadow /etc/gshadow && exit 1 || true
-echo " OK"
-echo -n " no homedir..."
-test -d /home/test4 && exit 1 || true
-echo " OK"
-echo -n " number of lines"
-test $lines_passwd = $(wc -l /etc/passwd | cut -f1 -d" ")
-echo -n "."
-test $lines_group = $(wc -l /etc/group | cut -f1 -d" ")
-echo -n "."
-test $lines_shadow = $(wc -l /etc/shadow | cut -f1 -d" ")
-echo -n "."
-test $lines_gshadow = $(wc -l /etc/gshadow | cut -f1 -d" ")
-echo -n "."
-echo " OK"
-
Modified: trunk/tests/usertools/01/run9
===================================================================
--- trunk/tests/usertools/01/run9 2006-08-06 14:57:49 UTC (rev 1077)
+++ trunk/tests/usertools/01/run9 2006-08-06 17:21:08 UTC (rev 1078)
@@ -5,7 +5,7 @@
cd $(dirname $0)
# Rational:
-# Test that useradd can add an user, usermod can change it
+# Test that usermod can change the informations on an user
save()
{
More information about the Pkg-shadow-commits
mailing list