X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tests%2Fscripts%2Ftest032-chain;h=88ac726f376e80e8552bcb22d9dca07fc6b49ab7;hb=58c0bf5ad12415ac4fde91d4ae39ac883eb28106;hp=2a7f684346b0e9c9725e7910d44df2bc363852c4;hpb=c890c96d13c53cf0fa1d9580fea2ab47a2c8caa9;p=openldap diff --git a/tests/scripts/test032-chain b/tests/scripts/test032-chain index 2a7f684346..88ac726f37 100755 --- a/tests/scripts/test032-chain +++ b/tests/scripts/test032-chain @@ -2,7 +2,7 @@ # $OpenLDAP$ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2008 The OpenLDAP Foundation. +## Copyright 1998-2011 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without @@ -116,9 +116,9 @@ for P in $PORT1 $PORT2 ; do fi echo "Filtering ldapsearch results..." - . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT + $LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." - . $LDIFFILTER < $CHAINOUT > $LDIFFLT + $LDIFFILTER < $CHAINOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -128,7 +128,7 @@ for P in $PORT1 $PORT2 ; do exit 1 fi - echo "Reading the referral entry "ou=Other,$BASEDN" as anonymous on port $P..." + echo "Reading the referral entry \"ou=Other,$BASEDN\" as anonymous on port $P..." $LDAPSEARCH -h $LOCALHOST -p $P -b "ou=Other,$BASEDN" -S "" \ > $SEARCHOUT 2>&1 @@ -140,9 +140,9 @@ for P in $PORT1 $PORT2 ; do fi echo "Filtering ldapsearch results..." - . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT + $LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." - . $LDIFFILTER < $CHAINREFOUT > $LDIFFLT + $LDIFFILTER < $CHAINREFOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -158,10 +158,10 @@ for P in $PORT1 $PORT2 ; do > $TESTOUT 2>&1 RC=$? - if test $RC != 6 ; then + if test $RC != 6 && test $RC,$BACKEND != 5,null ; then echo "ldapcompare failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi DN="ou=Other,$BASEDN" @@ -170,10 +170,10 @@ for P in $PORT1 $PORT2 ; do > $TESTOUT 2>&1 RC=$? - if test $RC != 6 ; then + if test $RC != 6 && test $RC,$BACKEND != 5,null ; then echo "ldapcompare failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi done @@ -269,9 +269,9 @@ for P in $PORT1 $PORT2 ; do fi echo "Filtering ldapsearch results..." - . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT + $LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." - . $LDIFFILTER < $CHAINMODOUT > $LDIFFLT + $LDIFFILTER < $CHAINMODOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -304,6 +304,31 @@ if test $RC != 0 ; then exit $RC fi +# ITS#57?? +$LDAPADD -h $LOCALHOST -p $PORT1 \ + -D "$MANAGERDN" -w secret \ + >> $TESTOUT 2>&1 \ + << EOMODS +dn: ou=Can't Contact,dc=example,dc=com +changetype: add +objectclass: referral +objectclass: extensibleobject +ou: Can't Contact +# invalid URI to test broken connectivity handling (search only) +ref: ${URI3}ou=Can't%20Contact,dc=example,dc=com +EOMODS + +echo "Reading the referral entry \"ou=Can't Contact,$BASEDN\" as anonymous on port $PORT1..." +$LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" -S "" "(cn=Can't Contact)" \ + > $SEARCHOUT 2>&1 + +RC=$? +if test $RC != 0 ; then + echo "ldapsearch failed ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC +fi + test $KILLSERVERS != no && kill -HUP $KILLPIDS echo ">>>>> Test succeeded"