Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2010-04-01 21:49:43 +0200
committerArthur de Jong <arthur@arthurdejong.org>2010-04-01 21:49:43 +0200
commitf41023a2c8fc0cf2c54549020269ba6c79533b0f (patch)
tree2e394a208e99f4bac337b0f6ecba64234e681753
parent738e6bdc61c14f3a71db1e3ae645ccc7bf65cf44 (diff)
small improvements to the test setup
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1077 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r--tests/README6
-rw-r--r--tests/test.ldif.gzbin181044 -> 188862 bytes
-rwxr-xr-xtests/test_nsscmds.sh27
3 files changed, 14 insertions, 19 deletions
diff --git a/tests/README b/tests/README
index 594779c..4e4a373 100644
--- a/tests/README
+++ b/tests/README
@@ -28,9 +28,9 @@ you need the following in /etc/ldap/slapd.conf:
The LDAP server should be set up to service up the dc=test,dc=tld DN as base.
-A sample test.ldif file is also available. Note that this file is currently
-not shipped in the released tarballs because it is quite large. Load the file
-into your LDAP server so that it can be served.
+A sample test.ldif file is also available in the SVN repository. Note that
+this file is currently not shipped in the released tarballs because it is
+quite large. Load the file into your LDAP server so that it can be served.
Most of the names in the database have been randomly generated based on a
combination of name-lists that were found on the Internet.
diff --git a/tests/test.ldif.gz b/tests/test.ldif.gz
index b43ab12..0c2c2d1 100644
--- a/tests/test.ldif.gz
+++ b/tests/test.ldif.gz
Binary files differ
diff --git a/tests/test_nsscmds.sh b/tests/test_nsscmds.sh
index f48cda3..d435866 100755
--- a/tests/test_nsscmds.sh
+++ b/tests/test_nsscmds.sh
@@ -2,7 +2,7 @@
# test.sh - simple test script to check output of name lookup commands
#
-# Copyright (C) 2007, 2008, 2009 Arthur de Jong
+# Copyright (C) 2007, 2008, 2009, 2010 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -20,11 +20,9 @@
# 02110-1301 USA
# This script expects to be run in an environment where nss-pam-ldapd
-# is deployed with an LDAP server with the proper contents (nslcd running).
-# FIXME: update the above description and provide actual LDIF file
-# It's probably best to run this in an environment without nscd.
-
-# note that nscd should not be running (breaks services test)
+# is deployed with an LDAP server with the proper content (and nslcd running).
+# It's probably best to run this in an environment without nscd (this breaks
+# the services tests).
set -e
@@ -92,6 +90,8 @@ check() {
echo "test_nsscmds.sh: testing aliases..."
+# note that this doesn't work if /etc/aliases contains anything
+
# check all aliases
check "getent aliases|sort" << EOM
bar2: foobar@example.com
@@ -230,11 +230,6 @@ check "getent hosts | grep testhost" << EOM
10.0.0.1 testhost testhostalias
EOM
-# dummy test for IPv6 envoronment
-check "getent hosts ::1" << EOM
-::1 ip6-localhost ip6-loopback
-EOM
-
# TODO: add more tests for IPv6 support
###########################################################################
@@ -303,11 +298,11 @@ EOM
echo "test_nsscmds.sh: testing protocols..."
check "getent protocols protfoo" << EOM
-protfoo 140 protfooalias
+protfoo 253 protfooalias
EOM
check "getent protocols protfooalias" << EOM
-protfoo 140 protfooalias
+protfoo 253 protfooalias
EOM
# check protocol with different case
@@ -318,8 +313,8 @@ EOM
check "getent protocols PROTFOOALIAS" << EOM
EOM
-check "getent protocols 140" << EOM
-protfoo 140 protfooalias
+check "getent protocols 253" << EOM
+protfoo 253 protfooalias
EOM
check "getent protocols icmp" << EOM
@@ -327,7 +322,7 @@ icmp 1 ICMP
EOM
check "getent protocols | grep protfoo" << EOM
-protfoo 140 protfooalias
+protfoo 253 protfooalias
EOM
###########################################################################