Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Some tweaks to the test harnes so we can use OpenLDAP 2.1

  • Loading branch information...
commit 7794693f3bbaf3f6af1f3d10e2c36b7e3a9523ff 1 parent a86923c
@gbarr gbarr authored
Showing with 14 additions and 5 deletions.
  1. +7 −4 data/slapd2-conf.in
  2. +3 −1 t/common.pl
  3. +4 −0 test.cfg
View
11 data/slapd2-conf.in
@@ -1,9 +1,9 @@
#
# master slapd config -- for testing
#
-include ./data/core.schema
-include ./data/cosine.schema
-include ./data/inetorgperson.schema
+include $SCHEMA_DIR/core.schema
+include $SCHEMA_DIR/cosine.schema
+include $SCHEMA_DIR/inetorgperson.schema
schemacheck off
pidfile $TESTDB/slapd.pid
argsfile $TESTDB/slapd.args
@@ -12,7 +12,7 @@ argsfile $TESTDB/slapd.args
# ldbm database definitions
#######################################################################
-database ldbm
+database $SLAPD_DB
suffix "$BASEDN"
directory $TESTDB
rootdn "$MANAGERDN"
@@ -20,8 +20,11 @@ rootpw $PASSWD
TLSCertificateFile ./data/cert.pem
TLSCertificateKeyFile ./data/key.pem
+
+password-hash {CLEARTEXT}
#sasl-host localhost
#sasl-realm testing
#sasl-secprops passcred
#sasl-secprops noanonymous
sasl-secprops none
+sasl-regexp "uid=(.*),cn=.*,cn=auth" "cn=$1,o=University of Michigan,c=US"
View
4 t/common.pl
@@ -12,6 +12,8 @@ BEGIN
# Where to put temporary files while testing
# the Makefile is setup to delete temp/ when make clean is run
$TEMPDIR = "./temp";
+ $SCHEMA_DIR ||= "./data";
+ $SLAPD_DB ||= 'ldbm';
$TESTDB = "$TEMPDIR/test-db";
$CONF = "$TEMPDIR/conf";
@@ -72,7 +74,7 @@ sub start_server {
open(CONFI,"<$CONF_IN") or die "$!";
open(CONFO,">$CONF") or die "$!";
while(<CONFI>) {
- s/\$(\w+)/${$1}/g;
+ s/\$([A-Z]\w*)/${$1}/g;
s/^TLS/#TLS/ unless $SSL_PORT;
s/^(sasl.*)/#\1/ unless $SASL;
print CONFO;
View
4 test.cfg
@@ -13,6 +13,10 @@ $SERVER_TYPE = "openldap2";
# $HOST = "localhost";
+# If you are using openldap 2.1 then you will need to change this to point
+# to your installation schema dir (eg /usr/local/etc/openldap/schema)
+$SCHEMA_DIR = "";
+
$EXTERNAL_TESTS = 0;
# %sortctrl = (
Please sign in to comment.
Something went wrong with that request. Please try again.