From 8c9076536d4154324ab1dded6a1977ba8e590805 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Tue, 19 Jan 2016 22:58:28 +0100 Subject: [PATCH] add ldap testing (tree+simple) to regression tests; skip known-failing tests --- regression-tests/backends/common | 4 ++ regression-tests/backends/ldap-master | 37 +++++++++++++++++++ regression-tests/runtests | 1 + regression-tests/start-test-stop | 2 + .../tests/8bit-txt-unescaped/skip.ldap-simple | 0 .../tests/8bit-txt-unescaped/skip.ldap-tree | 0 .../tests/any-query/skip.ldap-simple | 0 .../tests/any-query/skip.ldap-tree | 0 .../tests/basic-nonzone/skip.ldap-simple | 0 .../tests/basic-nonzone/skip.ldap-tree | 0 .../basic-ns-resolution/skip.ldap-simple | 0 .../tests/basic-ns-resolution/skip.ldap-tree | 0 .../cname-to-unauth-any/skip.ldap-simple | 0 .../tests/cname-to-unauth-any/skip.ldap-tree | 0 .../tests/cname-to-unauth/skip.ldap-simple | 0 .../tests/cname-to-unauth/skip.ldap-tree | 0 regression-tests/tests/dname/skip.ldap-simple | 0 regression-tests/tests/dname/skip.ldap-tree | 0 .../external-cname-pointer/skip.ldap-simple | 0 .../external-cname-pointer/skip.ldap-tree | 0 .../skip.ldap-simple | 0 .../mx-case-sensitivy-with-ap/skip.ldap-tree | 0 .../skip.ldap-simple | 0 .../skip.ldap-tree | 0 .../tests/root-mx/skip.ldap-simple | 0 regression-tests/tests/root-mx/skip.ldap-tree | 0 .../tests/root-srv/skip.ldap-simple | 0 .../tests/root-srv/skip.ldap-tree | 0 .../tests/secure-delegation/skip.ldap-simple | 0 .../tests/unknown-domain/skip.ldap-simple | 0 .../tests/unknown-domain/skip.ldap-tree | 0 31 files changed, 44 insertions(+) create mode 100644 regression-tests/backends/ldap-master create mode 100644 regression-tests/tests/8bit-txt-unescaped/skip.ldap-simple create mode 100644 regression-tests/tests/8bit-txt-unescaped/skip.ldap-tree create mode 100644 regression-tests/tests/any-query/skip.ldap-simple create mode 100644 regression-tests/tests/any-query/skip.ldap-tree create mode 100644 regression-tests/tests/basic-nonzone/skip.ldap-simple create mode 100644 regression-tests/tests/basic-nonzone/skip.ldap-tree create mode 100644 regression-tests/tests/basic-ns-resolution/skip.ldap-simple create mode 100644 regression-tests/tests/basic-ns-resolution/skip.ldap-tree create mode 100644 regression-tests/tests/cname-to-unauth-any/skip.ldap-simple create mode 100644 regression-tests/tests/cname-to-unauth-any/skip.ldap-tree create mode 100644 regression-tests/tests/cname-to-unauth/skip.ldap-simple create mode 100644 regression-tests/tests/cname-to-unauth/skip.ldap-tree create mode 100644 regression-tests/tests/dname/skip.ldap-simple create mode 100644 regression-tests/tests/dname/skip.ldap-tree create mode 100644 regression-tests/tests/external-cname-pointer/skip.ldap-simple create mode 100644 regression-tests/tests/external-cname-pointer/skip.ldap-tree create mode 100644 regression-tests/tests/mx-case-sensitivy-with-ap/skip.ldap-simple create mode 100644 regression-tests/tests/mx-case-sensitivy-with-ap/skip.ldap-tree create mode 100644 regression-tests/tests/mx-with-simple-additional-processing/skip.ldap-simple create mode 100644 regression-tests/tests/mx-with-simple-additional-processing/skip.ldap-tree create mode 100644 regression-tests/tests/root-mx/skip.ldap-simple create mode 100644 regression-tests/tests/root-mx/skip.ldap-tree create mode 100644 regression-tests/tests/root-srv/skip.ldap-simple create mode 100644 regression-tests/tests/root-srv/skip.ldap-tree create mode 100644 regression-tests/tests/secure-delegation/skip.ldap-simple create mode 100644 regression-tests/tests/unknown-domain/skip.ldap-simple create mode 100644 regression-tests/tests/unknown-domain/skip.ldap-tree diff --git a/regression-tests/backends/common b/regression-tests/backends/common index be3b784c9..220765dc8 100644 --- a/regression-tests/backends/common +++ b/regression-tests/backends/common @@ -55,6 +55,10 @@ start_master () source ./backends/tinydns-master ;; + ldap*) + source ./backends/ldap-master + ;; + ext-nsd*) source ./ext/nsd-master ;; diff --git a/regression-tests/backends/ldap-master b/regression-tests/backends/ldap-master new file mode 100644 index 000000000..1f490696c --- /dev/null +++ b/regression-tests/backends/ldap-master @@ -0,0 +1,37 @@ +case $context in + ldap-tree | ldap-simple) + [ -z "$LDAPUSER" ] && LDAPUSER='uid=testuser,o=power' + [ -z "$LDAPPASSWD" ] && LDAPPASSWD='secret' + [ -z "$LDAPBASEDN" ] && LDAPBASEDN='ou=dns,o=power' + [ -z "$LDAPRELATTR" ] && LDAPRELATTR='ou: dns' + + layout=${context:5} + ldapdelete -D $LDAPUSER -w $LDAPPASSWD -r $LDAPBASEDN || true + ldapadd -D $LDAPUSER -w $LDAPPASSWD << __EOF__ +dn: $LDAPBASEDN +objectClass: organizationalUnit +$LDAPRELATTR +__EOF__ + + $ZONE2LDAP --dnsttl=yes --basedn=$LDAPBASEDN --layout=$layout --named-conf=named.conf | ldapmodify -D $LDAPUSER -w $LDAPPASSWD -c > /dev/null || true + + cat > pdns-ldap.conf << __EOF__ +module-dir=./modules +launch=ldap +ldap-basedn=$LDAPBASEDN +ldap-binddn=$LDAPUSER +ldap-secret=$LDAPPASSWD +ldap-method=$layout +__EOF__ + + $RUNWRAPPER $PDNS --daemon=no --local-port=$port --config-dir=. \ + --config-name=ldap --socket-dir=./ --no-shuffle \ + --query-logging \ + --cache-ttl=$cachettl --dname-processing $lua_prequery & + + skipreasons="nodnssec noent nodyndns nometa noaxfr" + + ;; + *) + nocontext=yes +esac diff --git a/regression-tests/runtests b/regression-tests/runtests index 4304128e9..ccefb1ca3 100755 --- a/regression-tests/runtests +++ b/regression-tests/runtests @@ -9,6 +9,7 @@ export SDIG=${SDIG:-${PWD}/../pdns/sdig} export NSEC3DIG=${NSEC3DIG:-${PWD}/../pdns/nsec3dig} export SAXFR=${SAXFR:-${PWD}/../pdns/saxfr} export ZONE2SQL=${ZONE2SQL:-${PWD}/../pdns/zone2sql} +export ZONE2LDAP=${ZONE2LDAP:-${PWD}/../pdns/zone2ldap} export PDNSUTIL=${PDNSUTIL:-${PWD}/../pdns/pdnsutil} export PDNSCONTROL=${PDNSCONTROL:-${PWD}/../pdns/pdns_control} diff --git a/regression-tests/start-test-stop b/regression-tests/start-test-stop index 106beaf9a..d9cc53255 100755 --- a/regression-tests/start-test-stop +++ b/regression-tests/start-test-stop @@ -11,6 +11,7 @@ export SDIG=${SDIG:-${PWD}/../pdns/sdig} export NSEC3DIG=${NSEC3DIG:-${PWD}/../pdns/nsec3dig} export SAXFR=${SAXFR:-${PWD}/../pdns/saxfr} export ZONE2SQL=${ZONE2SQL:-${PWD}/../pdns/zone2sql} +export ZONE2LDAP=${ZONE2LDAP:-${PWD}/../pdns/zone2ldap} export PDNSUTIL=${PDNSUTIL:-${PWD}/../pdns/pdnsutil} export PDNSCONTROL=${PDNSCONTROL:-${PWD}/../pdns/pdns_control} @@ -214,6 +215,7 @@ remotebackend-pipe-dnssec remotebackend-unix-dnssec remotebackend-http-dnssec re #remotebackend-pipe-nsec3 remotebackend-unix-nsec3 remotebackend-http-nsec3 #remotebackend-pipe-nsec3-narrow remotebackend-unix-nsec3-narrow remotebackend-http-nsec3-narrow tinydns +ldap-tree ldap-simple #ext-nsd ext-nsd-nsec ext-nsd-nsec3 ext-bind ext-bind-nsec ext-bind-nsec3 * Add -presigned to any ext-nsd, ext-bind, bind, gmysql or gsqlite3 test (except narrow) diff --git a/regression-tests/tests/8bit-txt-unescaped/skip.ldap-simple b/regression-tests/tests/8bit-txt-unescaped/skip.ldap-simple new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/8bit-txt-unescaped/skip.ldap-tree b/regression-tests/tests/8bit-txt-unescaped/skip.ldap-tree new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/any-query/skip.ldap-simple b/regression-tests/tests/any-query/skip.ldap-simple new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/any-query/skip.ldap-tree b/regression-tests/tests/any-query/skip.ldap-tree new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/basic-nonzone/skip.ldap-simple b/regression-tests/tests/basic-nonzone/skip.ldap-simple new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/basic-nonzone/skip.ldap-tree b/regression-tests/tests/basic-nonzone/skip.ldap-tree new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/basic-ns-resolution/skip.ldap-simple b/regression-tests/tests/basic-ns-resolution/skip.ldap-simple new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/basic-ns-resolution/skip.ldap-tree b/regression-tests/tests/basic-ns-resolution/skip.ldap-tree new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/cname-to-unauth-any/skip.ldap-simple b/regression-tests/tests/cname-to-unauth-any/skip.ldap-simple new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/cname-to-unauth-any/skip.ldap-tree b/regression-tests/tests/cname-to-unauth-any/skip.ldap-tree new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/cname-to-unauth/skip.ldap-simple b/regression-tests/tests/cname-to-unauth/skip.ldap-simple new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/cname-to-unauth/skip.ldap-tree b/regression-tests/tests/cname-to-unauth/skip.ldap-tree new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/dname/skip.ldap-simple b/regression-tests/tests/dname/skip.ldap-simple new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/dname/skip.ldap-tree b/regression-tests/tests/dname/skip.ldap-tree new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/external-cname-pointer/skip.ldap-simple b/regression-tests/tests/external-cname-pointer/skip.ldap-simple new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/external-cname-pointer/skip.ldap-tree b/regression-tests/tests/external-cname-pointer/skip.ldap-tree new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/mx-case-sensitivy-with-ap/skip.ldap-simple b/regression-tests/tests/mx-case-sensitivy-with-ap/skip.ldap-simple new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/mx-case-sensitivy-with-ap/skip.ldap-tree b/regression-tests/tests/mx-case-sensitivy-with-ap/skip.ldap-tree new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/mx-with-simple-additional-processing/skip.ldap-simple b/regression-tests/tests/mx-with-simple-additional-processing/skip.ldap-simple new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/mx-with-simple-additional-processing/skip.ldap-tree b/regression-tests/tests/mx-with-simple-additional-processing/skip.ldap-tree new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/root-mx/skip.ldap-simple b/regression-tests/tests/root-mx/skip.ldap-simple new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/root-mx/skip.ldap-tree b/regression-tests/tests/root-mx/skip.ldap-tree new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/root-srv/skip.ldap-simple b/regression-tests/tests/root-srv/skip.ldap-simple new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/root-srv/skip.ldap-tree b/regression-tests/tests/root-srv/skip.ldap-tree new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/secure-delegation/skip.ldap-simple b/regression-tests/tests/secure-delegation/skip.ldap-simple new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/unknown-domain/skip.ldap-simple b/regression-tests/tests/unknown-domain/skip.ldap-simple new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/tests/unknown-domain/skip.ldap-tree b/regression-tests/tests/unknown-domain/skip.ldap-tree new file mode 100644 index 000000000..e69de29bb -- 2.40.0