X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tests%2Fscripts%2Fsql-test900-write;h=dec22129f8f230460bcd75b562f7966dccc41b18;hb=b30fc9f571a4a04487cdbff1891c1d4d89fbf9d6;hp=c692e1e26d56c26158a031617d84c243622567cf;hpb=73bf45060013be27881a529eb39f6543956f9e93;p=openldap diff --git a/tests/scripts/sql-test900-write b/tests/scripts/sql-test900-write index c692e1e26d..dec22129f8 100755 --- a/tests/scripts/sql-test900-write +++ b/tests/scripts/sql-test900-write @@ -79,7 +79,7 @@ fi case ${RDBMS} in # list here the RDBMSes whose mapping allows writes -postgres|ibmdb2) +pgsql|ibmdb2) MANAGERDN="cn=Manager,${BASEDN}" echo "Testing add..." $LDAPMODIFY -v -c -D "$MANAGERDN" -w $PASSWD \ @@ -336,7 +336,7 @@ EOMODS -h $LOCALHOST -p $PORT1 >> $TESTOUT 2>&1 << EOMODS version: 1 -dn: cn=Should Fail,cn=Akakiy Zinberstein,${BASEDN} +dn: cn=Should Fail,ou=Referral,${BASEDN} changetype: add objectClass: inetOrgPerson cn: Should Fail @@ -348,7 +348,7 @@ EOMODS if test $RC = 0 ; then echo "ldapmodify should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi echo "Modifying a referral (should fail)..." @@ -356,7 +356,7 @@ EOMODS -h $LOCALHOST -p $PORT1 >> $TESTOUT 2>&1 << EOMODS version: 1 -dn: cn=Akakiy Zinberstein,${BASEDN} +dn: ou=Referral,${BASEDN} changetype: modify replace: ref ref: ldap://localhost:9009/ @@ -367,7 +367,7 @@ EOMODS if test $RC = 0 ; then echo "ldapmodify should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi echo "Renaming a referral (should fail)..." @@ -375,9 +375,9 @@ EOMODS -h $LOCALHOST -p $PORT1 >> $TESTOUT 2>&1 << EOMODS version: 1 -dn: cn=Akakiy Zinberstein,${BASEDN} +dn: ou=Referral,${BASEDN} changetype: modrdn -newrdn: cn=Akakiy Zinber +newrdn: ou=Renamed Referral deleteoldrdn: 1 EOMODS @@ -385,7 +385,7 @@ EOMODS if test $RC = 0 ; then echo "ldapmodify should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi echo "Deleting a referral (should fail)..." @@ -393,7 +393,7 @@ EOMODS -h $LOCALHOST -p $PORT1 >> $TESTOUT 2>&1 << EOMODS version: 1 -dn: cn=Akakiy Zinberstein,${BASEDN} +dn: ou=Referral,${BASEDN} changetype: delete EOMODS @@ -401,6 +401,26 @@ EOMODS if test $RC = 0 ; then echo "ldapmodify should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit 1 + fi + + echo "Adding a referral..." + $LDAPMODIFY -v -c -D "$MANAGERDN" -w $PASSWD \ + -h $LOCALHOST -p $PORT1 -M >> $TESTOUT 2>&1 << EOMODS +version: 1 + +dn: ou=Another Referral,${BASEDN} +changetype: add +objectClass: referral +objectClass: extensibleObject +ou: Another Referral +ref: ldap://localhost:9009/ +EOMODS + + RC=$? + if test $RC != 0 ; then + echo "ldapmodify failed ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS exit $RC fi @@ -409,7 +429,7 @@ EOMODS -h $LOCALHOST -p $PORT1 -M >> $TESTOUT 2>&1 << EOMODS version: 1 -dn: cn=Akakiy Zinberstein,${BASEDN} +dn: ou=Referral,${BASEDN} changetype: modify replace: ref ref: ldap://localhost:9009/ @@ -425,7 +445,7 @@ EOMODS echo "Using ldapsearch to retrieve the modified entry..." echo "# Using ldapsearch to retrieve the modified entry..." >> $SEARCHOUT - $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "cn=Akakiy Zinberstein,$BASEDN" -M \ + $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "ou=Referral,$BASEDN" -M \ "objectClass=*" '*' ref >> $SEARCHOUT 2>&1 RC=$? @@ -440,9 +460,9 @@ EOMODS -h $LOCALHOST -p $PORT1 -M >> $TESTOUT 2>&1 << EOMODS version: 1 -dn: cn=Akakiy Zinberstein,${BASEDN} +dn: ou=Referral,${BASEDN} changetype: modrdn -newrdn: cn=Akakiy Zinber +newrdn: ou=Renamed Referral deleteoldrdn: 1 EOMODS @@ -455,7 +475,7 @@ EOMODS echo "Using ldapsearch to retrieve the renamed entry..." echo "# Using ldapsearch to retrieve the renamed entry..." >> $SEARCHOUT - $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "cn=Akakiy Zinber,$BASEDN" -M \ + $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "ou=Renamed Referral,$BASEDN" -M \ "objectClass=*" '*' ref >> $SEARCHOUT 2>&1 RC=$? @@ -470,7 +490,7 @@ EOMODS -h $LOCALHOST -p $PORT1 -M >> $TESTOUT 2>&1 << EOMODS version: 1 -dn: cn=Akakiy Zinber,${BASEDN} +dn: ou=Renamed Referral,${BASEDN} changetype: delete EOMODS @@ -551,4 +571,3 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS echo ">>>>> Test succeeded" exit 0 -