From 87d5d6a92b1d90bd3d61ff4c2b2925cdc06853d7 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sun, 6 Dec 2009 16:08:13 +0000 Subject: [PATCH] Support back-null --- tests/data/slapd-syncrepl-slave-refresh1.conf | 1 + tests/data/slapd-valregex.conf | 1 + tests/data/slapd.conf | 1 + tests/run.in | 3 ++- tests/scripts/conf.sh | 1 + tests/scripts/test018-syncreplication-persist | 5 ----- tests/scripts/test024-unique | 18 ++++++++---------- tests/scripts/test055-valregex | 8 +++++--- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/data/slapd-syncrepl-slave-refresh1.conf b/tests/data/slapd-syncrepl-slave-refresh1.conf index b78bf23008..23805acf74 100644 --- a/tests/data/slapd-syncrepl-slave-refresh1.conf +++ b/tests/data/slapd-syncrepl-slave-refresh1.conf @@ -37,6 +37,7 @@ database @BACKEND@ suffix "dc=example,dc=com" rootdn "cn=Replica,dc=example,dc=com" rootpw secret +#null#bind on #~null~#directory @TESTDIR@/db.2.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub diff --git a/tests/data/slapd-valregex.conf b/tests/data/slapd-valregex.conf index 5059e1d85c..78df8b1e79 100644 --- a/tests/data/slapd-valregex.conf +++ b/tests/data/slapd-valregex.conf @@ -45,6 +45,7 @@ database @BACKEND@ suffix "dc=example,dc=com" rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#null#bind on #~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub diff --git a/tests/data/slapd.conf b/tests/data/slapd.conf index dcf52f3b4e..df785c2ecd 100644 --- a/tests/data/slapd.conf +++ b/tests/data/slapd.conf @@ -40,6 +40,7 @@ database @BACKEND@ suffix "dc=example,dc=com" rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#null#bind on #~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub diff --git a/tests/run.in b/tests/run.in index af8a79db2b..0a9df274e3 100644 --- a/tests/run.in +++ b/tests/run.in @@ -29,6 +29,7 @@ AC_hdb=@BUILD_HDB@ AC_ldap=ldap@BUILD_LDAP@ AC_meta=meta@BUILD_META@ AC_monitor=@BUILD_MONITOR@ +AC_null=null@BUILD_NULL@ AC_relay=relay@BUILD_RELAY@ AC_sql=sql@BUILD_SQL@ @@ -63,7 +64,7 @@ if test "${AC_meta}" = "metamod" && test "${AC_LIBS_DYNAMIC}" = "static" ; then AC_meta="metano" fi -export AC_bdb AC_hdb AC_ldap AC_meta AC_monitor AC_relay AC_sql \ +export AC_bdb AC_hdb AC_ldap AC_meta AC_monitor AC_null AC_relay AC_sql \ AC_accesslog AC_dds AC_dynlist AC_memberof AC_pcache AC_ppolicy \ AC_refint AC_retcode AC_rwm AC_unique AC_syncprov AC_translucent \ AC_valsort \ diff --git a/tests/scripts/conf.sh b/tests/scripts/conf.sh index bb50966d81..c031e9111d 100755 --- a/tests/scripts/conf.sh +++ b/tests/scripts/conf.sh @@ -40,6 +40,7 @@ sed -e "s/@BACKEND@/${BACKEND}/" \ -e "s/^#${BACKENDTYPE}#//" \ -e "s/^#${AC_ldap}#//" \ -e "s/^#${AC_meta}#//" \ + -e "s/^#${AC_null}#//" \ -e "s/^#${AC_relay}#//" \ -e "s/^#${AC_sql}#//" \ -e "s/^#${RDBMS}#//" \ diff --git a/tests/scripts/test018-syncreplication-persist b/tests/scripts/test018-syncreplication-persist index bcecc837d5..b107d992ef 100755 --- a/tests/scripts/test018-syncreplication-persist +++ b/tests/scripts/test018-syncreplication-persist @@ -13,11 +13,6 @@ ## top-level directory of the distribution or, alternatively, at ## . -if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" && test "$BACKEND" != "ldif"; then - echo "Test does not support $BACKEND" - exit 0 -fi - echo "running defines.sh" . $SRCDIR/scripts/defines.sh diff --git a/tests/scripts/test024-unique b/tests/scripts/test024-unique index 286677f85a..4986da8906 100755 --- a/tests/scripts/test024-unique +++ b/tests/scripts/test024-unique @@ -21,10 +21,8 @@ if test $UNIQUE = uniqueno; then exit 0 fi -if test $BACKEND = null; then - echo "Test does not support $BACKEND backend, test skipped" - exit 0 -fi +RCODEconstraint=19 +test $BACKEND = null && RCODEconstraint=0 mkdir -p $TESTDIR $DBDIR1 @@ -112,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 @@ -228,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 @@ -285,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 @@ -345,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 @@ -510,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 @@ -582,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 diff --git a/tests/scripts/test055-valregex b/tests/scripts/test055-valregex index 006e3c781c..84a97d4c91 100755 --- a/tests/scripts/test055-valregex +++ b/tests/scripts/test055-valregex @@ -74,9 +74,11 @@ case $RC in echo "ldapmodify failed as expected" ;; 0) - echo "ldapmodify should have failed ($RC)!" - test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit -1 + if test $BACKEND != null ; then + echo "ldapmodify should have failed ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit -1 + fi ;; *) echo "ldapmodify failed ($RC)!" -- 2.39.5