]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test024-unique
Merge remote-tracking branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_4
[openldap] / tests / scripts / test024-unique
index 34ed82603585e8325d1171c55c9587ac42ab9ebb..9354c05f825d639e8438adf21cd268be9ff71d3d 100755 (executable)
@@ -2,7 +2,7 @@
 # $OpenLDAP$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 2004-2009 The OpenLDAP Foundation.
+## Copyright 2004-2013 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -21,6 +21,9 @@ if test $UNIQUE = uniqueno; then
        exit 0
 fi
 
+RCODEconstraint=19
+test $BACKEND = null && RCODEconstraint=0
+
 mkdir -p $TESTDIR $DBDIR1
 
 $SLAPPASSWD -g -n >$CONFIGPWF
@@ -107,7 +110,7 @@ employeeType: contractor
 givenName: Bill
 EOTUNIQ2
 RC=$?
-if test $RC != 19 ; then
+if test $RC != $RCODEconstraint ; then
        echo "unique check failed ($RC)!"
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
        exit -1
@@ -223,7 +226,7 @@ employeeType: contractor
 givenName: Bill
 EOTUNIQ2
 RC=$?
-if test $RC != 19 ; then
+if test $RC != $RCODEconstraint ; then
        echo "unique check failed ($RC)!"
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
        exit -1
@@ -280,7 +283,7 @@ employeeType: contractor
 givenName: Bill
 EOTUNIQ2
 RC=$?
-if test $RC != 19 ; then
+if test $RC != $RCODEconstraint ; then
        echo "olcUniqueAttribtue single deletion hit the wrong value"
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
        exit -1
@@ -340,7 +343,7 @@ employeeType: contractor
 givenName: Bill
 EOTUNIQ2
 RC=$?
-if test $RC != 19 ; then
+if test $RC != $RCODEconstraint ; then
        echo "unique check failed ($RC)!"
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
        exit -1
@@ -505,7 +508,7 @@ cn: elvis
 EOF
 
 RC=$?
-if test $RC != 19 ; then
+if test $RC != $RCODEconstraint ; then
        echo "unique check failed ($RC)!"
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
        exit -1
@@ -577,7 +580,7 @@ description: left the building
 EOF
 
 RC=$?
-if test $RC != 19 ; then
+if test $RC != $RCODEconstraint ; then
        echo "unique check failed ($RC)!"
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
        exit -1