mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 05:18:52 +00:00
[ticket/12574] Introduce files for LDAP testing on travis
PHPBB3-12574
This commit is contained in:
parent
791d633b8a
commit
51bb05f286
4 changed files with 47 additions and 0 deletions
|
@ -37,6 +37,7 @@ install:
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
|
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
|
||||||
|
- travis/setup-ldap.sh $SLOWTESTS
|
||||||
- phantomjs --webdriver=8910 > /dev/null &
|
- phantomjs --webdriver=8910 > /dev/null &
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
|
5
travis/ldap/base.ldif
Normal file
5
travis/ldap/base.ldif
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
dn:dc=example,dc=com
|
||||||
|
objectClass:dcObject
|
||||||
|
objectClass:organizationalUnit
|
||||||
|
dc:example
|
||||||
|
ou:foo
|
17
travis/ldap/slapd.conf
Normal file
17
travis/ldap/slapd.conf
Normal file
|
@ -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
|
24
travis/setup-ldap.sh
Executable file
24
travis/setup-ldap.sh
Executable file
|
@ -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
|
Loading…
Add table
Reference in a new issue