Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test the client, API improvements #9

Merged
merged 31 commits into from
Oct 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
089a945
Load data into LDAP server
mbabker Sep 13, 2017
6b21117
Adjust
mbabker Sep 13, 2017
6fa693a
Sleep
mbabker Sep 13, 2017
d0293d7
Right password
mbabker Sep 13, 2017
43cd3d0
Constructor internally dependent on Registry, implement test env setu…
mbabker Sep 13, 2017
b433907
Add destructor to client, expand close method a bit, tests for DN met…
mbabker Sep 13, 2017
02f4920
Test tweaks, expand test coverage
mbabker Sep 13, 2017
c36c5c4
Implement tests, dump error message
mbabker Sep 13, 2017
9558412
Set v3 flag
mbabker Sep 13, 2017
69bbc8a
Explicitly check for boolean false otherwise the env var is set and s…
mbabker Sep 13, 2017
326b827
Expose ldap_unbind(), dump DN at bind to make sure things are right
mbabker Sep 13, 2017
2f4e2a4
Pass DN through bind so it isn't wiped out
mbabker Sep 13, 2017
a24dc81
Tweak DN setting in test, track bound state from bind method
mbabker Sep 13, 2017
dcb3152
Shortcut check for connection, don't try to search if not bound/conne…
mbabker Sep 13, 2017
f4900c1
Have to set base DN
mbabker Sep 13, 2017
eef0757
More search tests
mbabker Sep 13, 2017
b64b305
Merge branch 'master' of github.com:joomla-framework/ldap into tests
mbabker Oct 2, 2017
f5843ed
Replace
mbabker Oct 2, 2017
0e93c42
Check for connection, tests
mbabker Oct 2, 2017
52402fc
Test tweaks
mbabker Oct 2, 2017
97af3f3
One more test tweak
mbabker Oct 2, 2017
feb32be
Test read
mbabker Oct 2, 2017
74f7e59
Tweak dump spot
mbabker Oct 2, 2017
7fd4550
Next try
mbabker Oct 2, 2017
a0bac49
Should finish test up
mbabker Oct 2, 2017
fe968c4
Test delete
mbabker Oct 2, 2017
93424ce
Create test
mbabker Oct 2, 2017
298577c
Add/Rename tests
mbabker Oct 4, 2017
f9de807
Check for connection on get error, codestyle
mbabker Oct 4, 2017
72f1543
A round of doc block cleanup
mbabker Oct 4, 2017
45c4eb9
Try to connect before binding
mbabker Oct 4, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,16 @@ matrix:
- php: 7.2
- php: nightly

before_install:
- mkdir /tmp/slapd
- slapd -f .travis/ldap/conf/slapd.conf -h ldap://localhost:3389 &
# This sleep is required to ensure the slapd process is running before loading the data in
- sleep 3
- ldapadd -h localhost:3389 -D cn=admin,dc=joomla,dc=org -w joomla -f .travis/ldap/data/base.ldif
- ldapadd -h localhost:3389 -D cn=admin,dc=joomla,dc=org -w joomla -f .travis/ldap/data/fixtures.ldif

before_script:
# The Trusty build is compiled with LDAP support
# The Trusty build is compiled with LDAP support
- if [[ $TRAVIS_PHP_VERSION = 5.3 ]]; then phpenv config-add .travis/phpenv/ldap.ini; fi
- composer self-update
- composer update $COMPOSER_FLAGS
Expand Down
17 changes: 17 additions & 0 deletions .travis/ldap/conf/slapd.conf
Original file line number Diff line number Diff line change
@@ -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=joomla,dc=org"
rootdn "cn=admin,dc=joomla,dc=org"
rootpw {SSHA}kmwklAp1MLJT2ULJC3s9Ry3vo7XUrqj4
4 changes: 4 additions & 0 deletions .travis/ldap/data/base.ldif
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dn: dc=joomla,dc=org
objectClass: dcObject
objectClass: organizationalUnit
ou: Organization
24 changes: 24 additions & 0 deletions .travis/ldap/data/fixtures.ldif
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
dn: cn=Michael Babker,dc=joomla,dc=org
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
cn: Michael Babker
sn: mbabker
mail: michael.babker@joomla.org
ou: People
ou: Maintainers
givenName: Michael Babker
description: Framework Maintainer, CMS Release Lead, Production Department Coordinator

dn: ou=Components,dc=joomla,dc=org
objectclass: organizationalunit
ou: Components

dn: ou=Ldap,ou=Components,dc=joomla,dc=org
objectclass: organizationalunit
ou: Ldap

dn: ou=Ldap scoping,ou=Ldap,ou=Components,dc=joomla,dc=org
objectclass: organizationalunit
ou: Ldap scoping