]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#6825 slapo-unique: adjust test
authorOndřej Kuzník <ondra@mistotebe.net>
Wed, 15 Apr 2026 10:58:36 +0000 (11:58 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 30 Apr 2026 19:50:52 +0000 (19:50 +0000)
tests/scripts/test024-unique

index 81ec5a2a2b51a962cbaeda9e7a217e4c4fb23f84..6d5e141b7a2333955b39bd3dc612cb06cc66c831 100755 (executable)
@@ -681,7 +681,7 @@ dn: uid=not edgar,uid=edgar,ou=users,o=unique
 objectClass: inetOrgPerson
 uid: not edgar
 sn: Alan
-cn: not edgar
+cn: edgar
 EOF
 
 RC=$?
@@ -736,6 +736,23 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
+echo "Adding another record, not considered"
+$LDAPADD -D "$UNIQUEDN" -H $URI1 -w $PASSWD > \
+       $TESTOUT 2>&1 << EOF
+dn: uid=dave,uid=edgar,ou=users,o=unique
+objectClass: inetOrgPerson
+uid: dave
+sn: Alan
+cn: not edgar
+EOF
+
+RC=$?
+if test $RC != 0 ; then
+       echo "spurious unique error ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit 1
+fi
+
 echo "Cleaning up"
 $LDAPDELETE -D "$UNIQUEDN" -H $URI1 -w $PASSWD \
     "uid=edgar,uid=edgar,ou=users,o=unique" > $TESTOUT 2>&1
@@ -746,6 +763,15 @@ if test $RC != 0; then
        exit $RC
 fi
 
+$LDAPDELETE -D "$UNIQUEDN" -H $URI1 -w $PASSWD \
+    "uid=dave,uid=edgar,ou=users,o=unique" > $TESTOUT 2>&1
+RC=$?
+if test $RC != 0; then
+       echo "ldapdelete failed ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
+fi
+
 echo "Adding a record unique in one domain, non-unique in the filtered domain..."
 
 $LDAPADD -D "uid=dave,ou=users,o=unique" -H $URI1 -w $PASSWD > \