From: Pierangelo Masarati Date: Sat, 8 May 2004 22:06:31 +0000 (+0000) Subject: test delete as well... X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~389 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d5367227a009236a759defd6b2dc37bd104f82f2;p=openldap test delete as well... --- diff --git a/tests/data/emptydn.out.slapadd b/tests/data/emptydn.out.slapadd new file mode 100644 index 0000000000..8a65c0f621 --- /dev/null +++ b/tests/data/emptydn.out.slapadd @@ -0,0 +1,38 @@ +dn: c=US +objectClass: country +c: US + +dn: o=Example,c=US +objectClass: organization +o: Example +o: Example, Inc. + +dn: c=UK +objectClass: country +c: UK + +dn: o=Example,c=UK +objectClass: organization +o: Example +o: Example, Ltd. + +dn: c=IT +objectClass: country +c: IT + +dn: o=Esempio,c=IT +objectClass: organization +o: Esempio +o: Esempio S.p.A. +o: Example + +dn: c=DE +objectClass: country +c: DE + +dn: o=Beispiel,c=DE +objectClass: organization +o: Beispiel +o: Beispiel GmbH +o: Example + diff --git a/tests/data/test-emptydn1.ldif b/tests/data/test-emptydn1.ldif index 0fb5500b7e..166dca5175 100644 --- a/tests/data/test-emptydn1.ldif +++ b/tests/data/test-emptydn1.ldif @@ -1,29 +1,14 @@ -# geographical naming contexts -dn: c=US -objectClass: country -c: US - -dn: o=Example,c=US -objectClass: organization -o: Example -o: Example, Inc. - -dn: c=UK -objectClass: country -c: UK - -dn: o=Example,c=UK -objectClass: organization -o: Example -o: Example, Ltd. - -dn: c=IT -objectClass: country -c: IT - -dn: o=Esempio,c=IT -objectClass: organization -o: Esempio -o: Esempio S.p.A. -o: Example +# dc=example,dc=com naming context +dn: dc=example,dc=com +objectClass: domain +objectClass: domainRelatedObject +dc: example +associatedDomain: example.com + +dn: cn=Geographical Naming Contexts,dc=example,dc=com +objectClass: groupOfNames +cn: Geographical Naming Contexts +member: o=Example,c=US +member: o=Example,c=UK +member: o=Esempio,c=IT diff --git a/tests/data/test-emptydn2.ldif b/tests/data/test-emptydn2.ldif index 166dca5175..64c4aaff70 100644 --- a/tests/data/test-emptydn2.ldif +++ b/tests/data/test-emptydn2.ldif @@ -1,14 +1,39 @@ -# dc=example,dc=com naming context -dn: dc=example,dc=com -objectClass: domain -objectClass: domainRelatedObject -dc: example -associatedDomain: example.com - -dn: cn=Geographical Naming Contexts,dc=example,dc=com -objectClass: groupOfNames -cn: Geographical Naming Contexts -member: o=Example,c=US -member: o=Example,c=UK -member: o=Esempio,c=IT +# geographical naming contexts +dn: c=US +objectClass: country +c: US + +dn: o=Example,c=US +objectClass: organization +o: Example +o: Example, Inc. + +dn: c=UK +objectClass: country +c: UK + +dn: o=Example,c=UK +objectClass: organization +o: Example +o: Example, Ltd. + +dn: c=IT +objectClass: country +c: IT + +dn: o=Esempio,c=IT +objectClass: organization +o: Esempio +o: Esempio S.p.A. +o: Example + +dn: c=DE +objectClass: country +c: DE + +dn: o=Beispiel,c=DE +objectClass: organization +o: Beispiel +o: Beispiel GmbH +o: Example diff --git a/tests/scripts/defines.sh b/tests/scripts/defines.sh index 43fc8f7843..f84455d083 100755 --- a/tests/scripts/defines.sh +++ b/tests/scripts/defines.sh @@ -130,8 +130,8 @@ LDIFREFINT=$DATADIR/test-refint.ldif LDIFUNIQUE=$DATADIR/test-unique.ldif LDIFLIMITS=$DATADIR/test-limits.ldif LDIFDN=$DATADIR/test-dn.ldif -LDIFEMPTYDN2=$DATADIR/test-emptydn1.ldif -LDIFEMPTYDN1=$DATADIR/test-emptydn2.ldif +LDIFEMPTYDN1=$DATADIR/test-emptydn1.ldif +LDIFEMPTYDN2=$DATADIR/test-emptydn2.ldif MONITOR="" REFDN="c=US" BASEDN="dc=example,dc=com" @@ -193,7 +193,8 @@ MODSRCHFILTERS=$DATADIR/modify.search.filters CERTIFICATETLS=$DATADIR/certificate.tls CERTIFICATEOUT=$DATADIR/certificate.out DNOUT=$DATADIR/dn.out -EMPTYDNOUT=$DATADIR/emptydn.out +EMPTYDNOUT1=$DATADIR/emptydn.out.slapadd +EMPTYDNOUT2=$DATADIR/emptydn.out # Just in case we linked the binaries dynamically LD_LIBRARY_PATH=`pwd`/../libraries:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH diff --git a/tests/scripts/test027-emptydn b/tests/scripts/test027-emptydn index fa38b5727d..b963bcf4f5 100755 --- a/tests/scripts/test027-emptydn +++ b/tests/scripts/test027-emptydn @@ -81,7 +81,7 @@ fi test $KILLSERVERS != no && kill -HUP $KILLPIDS -LDIFOUT=$EMPTYDNOUT +LDIFOUT=$EMPTYDNOUT1 echo "Comparing ldapsearch results against original..." $CMP $SEARCHOUT $LDIFOUT > $CMPOUT @@ -131,6 +131,15 @@ $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD \ $LDAPADD -D "$EMPTYDNDN" -h $LOCALHOST -p $PORT1 -w $PASSWD \ -f $LDIFEMPTYDN2 > /dev/null 2>&1 +$LDAPMODIFY -D "$EMPTYDNDN" -h $LOCALHOST -p $PORT1 -w $PASSWD \ + > /dev/null 2>&1 << EOF +dn: o=Beispiel,c=DE +changetype: delete + +dn: c=DE +changetype: delete +EOF + echo "Searching database..." $LDAPSEARCH -b "" -h $LOCALHOST -p $PORT1 > $SEARCHOUT 2>&1 @@ -144,7 +153,7 @@ fi test $KILLSERVERS != no && kill -HUP $KILLPIDS -LDIFOUT=$EMPTYDNOUT +LDIFOUT=$EMPTYDNOUT2 echo "Comparing ldapsearch results against original..." $CMP $SEARCHOUT $LDIFOUT > $CMPOUT