aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-10-30 18:08:17 +0100
committerMarc Alexander <admin@m-a-styles.de>2019-11-16 16:02:41 +0100
commit51bb05f2860ed086ea8ef502eb4120c952e110dd (patch)
treeed9775a16fd25bb98b9ffae04f2ff76ec4dfd7c4
parent791d633b8aad5e29d1c1a9fda844908d694a8341 (diff)
downloadforums-51bb05f2860ed086ea8ef502eb4120c952e110dd.tar
forums-51bb05f2860ed086ea8ef502eb4120c952e110dd.tar.gz
forums-51bb05f2860ed086ea8ef502eb4120c952e110dd.tar.bz2
forums-51bb05f2860ed086ea8ef502eb4120c952e110dd.tar.xz
forums-51bb05f2860ed086ea8ef502eb4120c952e110dd.zip
[ticket/12574] Introduce files for LDAP testing on travis
PHPBB3-12574
-rw-r--r--.travis.yml1
-rw-r--r--travis/ldap/base.ldif5
-rw-r--r--travis/ldap/slapd.conf17
-rwxr-xr-xtravis/setup-ldap.sh24
4 files changed, 47 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index 346d067240..d6fc46c585 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -37,6 +37,7 @@ install:
before_script:
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
+ - travis/setup-ldap.sh $SLOWTESTS
- phantomjs --webdriver=8910 > /dev/null &
script:
diff --git a/travis/ldap/base.ldif b/travis/ldap/base.ldif
new file mode 100644
index 0000000000..26535b9e72
--- /dev/null
+++ b/travis/ldap/base.ldif
@@ -0,0 +1,5 @@
+dn:dc=example,dc=com
+objectClass:dcObject
+objectClass:organizationalUnit
+dc:example
+ou:foo
diff --git a/travis/ldap/slapd.conf b/travis/ldap/slapd.conf
new file mode 100644
index 0000000000..5fce95cee2
--- /dev/null
+++ b/travis/ldap/slapd.conf
@@ -0,0 +1,17 @@
+# See slapd.conf(5) for details on configuration options.
+include /etc/ldap/schema/core.schema
+include /etc/ldap/schema/cosine.schema
+include /etc/ldap/schema/inetorgperson.schema
+include /etc/ldap/schema/nis.schema
+
+pidfile /tmp/slapd/slapd.pid
+argsfile /tmp/slapd/slapd.args
+
+modulepath /usr/lib/openldap
+
+database ldif
+directory /tmp/slapd
+
+suffix "dc=example,dc=com"
+rootdn "cn=admin,dc=example,dc=com"
+rootpw adminadmin
diff --git a/travis/setup-ldap.sh b/travis/setup-ldap.sh
new file mode 100755
index 0000000000..a8f4fddc49
--- /dev/null
+++ b/travis/setup-ldap.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# This file is part of the phpBB Forum Software package.
+#
+# @copyright (c) phpBB Limited <https://www.phpbb.com>
+# @license GNU General Public License, version 2 (GPL-2.0)
+#
+# For full copyright and license information, please see
+# the docs/CREDITS.txt file.
+#
+set -e
+set -x
+
+SLOWTESTS=$1
+
+if [ "$SLOWTESTS" == '1' ]
+then
+ sudo apt-get -y install ldap-utils slapd
+ echo "extension = ldap.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
+ mkdir /tmp/slapd
+ slapd -f travis/ldap/slapd.conf -h ldap://localhost:3389 &
+ sleep 3
+ ldapadd -h localhost:3389 -D "cn=admin,dc=example,dc=com" -w adminadmin -f travis/ldap/base.ldif
+fi