diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 0000000..1e76aad --- /dev/null +++ b/test/Makefile @@ -0,0 +1,5 @@ +all: + ./run-slapd.sh o=ifef ./ifef-dump.ldif + +import: + ssh root@identite.emploisdelafamille.fr slapcat \| bzip2 | bzip2 -d >ifef-dump.ldif diff --git a/test/run-slapd.sh b/test/run-slapd.sh new file mode 100755 index 0000000..da46d85 --- /dev/null +++ b/test/run-slapd.sh @@ -0,0 +1,57 @@ +#!env sh + +BASEDN=$1 +BASELDIF=$2 + +if ! test "x$BASEDN" != "x"; then + echo Missing BASEDN + exit 1 +fi + +if [ ! -f "$BASELDIF" ]; then + echo Missing LDIF file $BASELDIF + exit 1 +fi + +mkdir -p tmp +SLAPD_CONF=`tempfile -d ./tmp -p slapd.conf` +SLAPD_DATA=`mktemp --tmpdir=./tmp -d slapd.data.XXXXXXX` +SLAPD_PID=`tempfile -d ./tmp -p slapd.pid` + +cat >$SLAPD_CONF <