add data to test regression of ITS#4184

This commit is contained in:
Pierangelo Masarati 2005-12-20 19:47:31 +00:00
parent ed05c70208
commit e02659111c
6 changed files with 259 additions and 0 deletions

View file

@ -0,0 +1,14 @@
This directory contains test related to regression tracking that require
a specific setup and a complete test. Each regression test must be
contained in a test directory whose name is "its<number>", where <number>
is the ITS number, and it must be entirely executed by a script, contained
in that directory and with the same name of the directory. It can exploit
all the halpers provided for common tests, but it should simultaneously be
as self contained and as general as possible.
For example, if an issue only appears with a certain database type, the
test itself should only run when invoked for that database type;
otherwise, if the issue appears whatever backend is used, the test should
be parametric, so that it is run with the backend selected at run-time
via the "-b" switch of the "run" script.

View file

@ -0,0 +1 @@
ITS#4184: fixed in 2.3.14

View file

@ -0,0 +1,83 @@
dn: dc=example,dc=com
objectClass: domain
dc: example
dn: cn=Manager,dc=example,dc=com
objectClass: organizationalRole
cn: Manager
description: Directory Manager
dn: ou=People,dc=example,dc=com
objectClass: organizationalUnit
ou: People
dn: ou=Groups,dc=example,dc=com
objectClass: organizationalUnit
ou: Groups
dn: uid=user1,ou=people,dc=example,dc=com
objectClass: person
objectClass: posixAccount
cn: User 1
sn: User 1
uid: user1
uidNumber: 500
userPassword: {crypt}675B8Gwn6RJyY
homeDirectory: /home/user1
gidNumber: 10
gecos: User 1
dn: cn=A Group,ou=Groups,dc=example,dc=com
objectClass: groupOfNames
cn: A Group
member: uid=user1,ou=people,dc=example,dc=com
dn: cn=Another Group,ou=Groups,dc=example,dc=com
cn: Another Group
objectClass: groupOfNames
member: uid=user1,ou=People,dc=example,dc=com
member: uid=user2,ou=People,dc=example,dc=com
dn: uid=user3,ou=people,dc=example,dc=com
objectClass: person
objectClass: posixAccount
uid: user3
uidNumber: 5387
homeDirectory: /home/user3
loginShell: /bin/false
gecos: Slave
gidNumber: 100
userPassword: {crypt}675B8Gwn6RJyY
cn: Slave
sn: Slave
dn: uid=user2,ou=people,dc=example,dc=com
objectClass: person
objectClass: posixAccount
cn: User 2
sn: User 2
uid: user2
uidNumber: 23071
gecos: User 2
loginShell: /bin/false
homeDirectory: /home/user2
gidNumber: 100
userPassword: {crypt}675B8Gwn6RJyY
dn: ou=Special,dc=example,dc=com
objectClass: organizationalUnit
ou: Special
dn: uid=special1,ou=Special,dc=example,dc=com
objectClass: person
objectClass: posixAccount
cn: Special 1
sn: Special 1
uid: special1
uidNumber: 6319
homeDirectory: /home/special1
gecos: Special1
loginShell: /bin/false
userPassword: {crypt}675B8Gwn6RJyY
gidNumber: 100

View file

@ -0,0 +1,84 @@
#! /bin/sh
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 1998-2005 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted only as authorized by the OpenLDAP
## Public License.
##
## A copy of this license is available in the file LICENSE in the
## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" ; then
echo "Warning: this test is known to affect bdb and hdb, although it may impact other backends as well."
fi
mkdir -p $DBDIR1A $DBDIR2A
ITS=4184
ITSDIR=$DATADIR/regressions/its$ITS
USER="uid=user1,ou=People,dc=example,dc=com"
PASS="abc"
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND $MONITORDB < $ITSDIR/slapd.conf > $CONF1
$SLAPADD -f $CONF1 -l $ITSDIR/adds.ldif
RC=$?
if test $RC != 0 ; then
echo "slapadd failed ($RC)!"
exit $RC
fi
echo "Starting slapd on TCP/IP port $PORT1..."
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
PID=$!
if test $WAIT != 0 ; then
echo PID $PID
read foo
fi
KILLPIDS="$PID"
sleep 1
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
'(objectClass=*)' > /dev/null 2>&1
RC=$?
if test $RC = 0 ; then
break
fi
echo "Waiting 5 seconds for slapd to start..."
sleep 5
done
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
for S in 1 2 ; do
FILE="${ITSDIR}/mods.ldif"
echo "${S}) Applying `basename ${FILE}`..."
$LDAPMODIFY -v -D "$USER" -w $PASS -h $LOCALHOST -p $PORT1 \
-f "${FILE}" > $TESTOUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "ldapmodify failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
sleep 1
done
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
exit 0

View file

@ -0,0 +1,15 @@
dn: cn=Another Group,ou=Groups,dc=example,dc=com
changetype: modify
add: member
member: uid=user3,ou=People,dc=example,dc=com
dn: cn=Another Group,ou=Groups,dc=example,dc=com
changetype: modify
delete: member
member: uid=user3,ou=people,dc=example,dc=com
dn: uid=special1,ou=Special,dc=example,dc=com
changetype: modify
replace: sn
sn: NewName

View file

@ -0,0 +1,62 @@
# $OpenLDAP$
#
# ITS 4184 slapd.conf
include @SCHEMADIR@/core.schema
include @SCHEMADIR@/cosine.schema
include @SCHEMADIR@/nis.schema
include @SCHEMADIR@/misc.schema
pidfile @TESTDIR@/slapd.pid
argsfile @TESTDIR@/slapd.args
#mod#modulepath ../servers/slapd/back-@BACKEND@/
#mod#moduleload back_@BACKEND@.la
loglevel 0
# ACL issue: with this ACL doesn't show up
#access to * by * write
# database access control definitions
access to attrs=userPassword
by self write
by group="cn=A Group,ou=Groups,dc=example,dc=com" write
by group="cn=Another Group,ou=Groups,dc=example,dc=com" write
by anonymous auth
access to *
by self write
by group="cn=Another Group,ou=Groups,dc=example,dc=com" write
by * read
#######################################################################
# ldbm database definitions
#######################################################################
database @BACKEND@
suffix "ou=Special,dc=example,dc=com"
subordinate
rootdn "cn=Manager,dc=example,dc=com"
directory @TESTDIR@/db.2.a
# Indices to maintain
#bdb#index default pres,eq
#bdb#index sn pres,eq,sub
#hdb#index default pres,eq
#hdb#index sn pres,eq,sub
database @BACKEND@
suffix "dc=example,dc=com"
rootdn "cn=Manager,dc=example,dc=com"
rootpw secret
directory @TESTDIR@/db.1.a
# Indices to maintain
#bdb#index default pres,eq
#bdb#index sn pres,eq,sub
#bdb#index objectClass eq
#hdb#index default pres,eq
#hdb#index sn pres,eq,sub
#hdb#index objectClass eq