]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Update Travis LDAP testing to use new container setup script
authorJoe Orton <jorton@apache.org>
Tue, 16 Jun 2020 14:07:53 +0000 (14:07 +0000)
committerJoe Orton <jorton@apache.org>
Tue, 16 Jun 2020 14:07:53 +0000 (14:07 +0000)
provided by test framework.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1878889 13f79535-47bb-0310-9956-ffa450edef68

test/travis_Dockerfile_slapd
test/travis_before_linux.sh

index 8da818e95830f7a7eea31f6ddd5b7ba8521df4f2..e0729e3c2b6c329a62da8c2b3e73214c51628a87 100644 (file)
@@ -4,6 +4,6 @@ RUN echo slapd slapd/password2 password travis | debconf-set-selections
 RUN echo slapd slapd/internal/adminpw password travis | debconf-set-selections
 RUN echo slapd slapd/internal/generated_adminpw password travis | debconf-set-selections
 RUN echo slapd slapd/domain string example.com | debconf-set-selections
-RUN apt-get update && apt-get -y install slapd
+RUN apt-get update && apt-get -y install slapd ldap-utils
 # With -d passed, slapd stays in the foreground
-CMD /usr/sbin/slapd -d1
+CMD /usr/sbin/slapd -d1 '-h ldap:// ldapi:///'
index 4c8c991c6809ea2fe42f50dc986643ddd62112c0..e46ea658379845ad42d408312a21bd3a87c480f3 100755 (executable)
@@ -83,12 +83,11 @@ fi
 
 # For LDAP testing, run slapd listening on port 8389 and populate the
 # directory as described in t/modules/ldap.t in the test framework:
-LDIF=test/perl-framework/scripts/httpd.ldif
-if test -v TEST_LDAP -a -r $LDIF ; then
-    docker build -t httpd_slapd -f test/travis_Dockerfile_slapd test/
-    docker run -d -p 8389:389 httpd_slapd | tee .slapd.cid
-    sleep 5
-    ldapadd -H ldap://localhost:8389 -D cn=admin,dc=example,dc=com -w travis < $LDIF
+if test -v TEST_LDAP -a -x test/perl-framework/scripts/ldap-init.sh; then
+    docker build -t httpd_ldap -f test/travis_Dockerfile_slapd test/
+    pushd test/perl-framework
+       ./scripts/ldap-init.sh
+    popd
 fi
 
 if test -v APR_VERSION; then