File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Local OpenLDAP Integration Testing
2
+
3
+ Set up a [ Vagrant] ( http://www.vagrantup.com/ ) VM to run tests against OpenLDAP locally.
4
+
5
+ To run tests against OpenLDAP (instead of ApacheDS) locally:
6
+
7
+ ``` bash
8
+ # start VM (from the correct directory)
9
+ $ cd test/support/vm/openldap/
10
+ $ vagrant up
11
+
12
+ # get the IP address of the VM
13
+ $ ip=$( vagrant ssh -- " ifconfig eth1 | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n1" )
14
+
15
+ # change back to root project directory
16
+ $ cd ../../../..
17
+
18
+ # run all tests against OpenLDAP
19
+ $ time TESTENV=openldap OPENLDAP_HOST=$ip bundle exec rake
20
+
21
+ # run a specific test file against OpenLDAP
22
+ $ time TESTENV=openldap OPENLDAP_HOST=$ip bundle exec ruby test/membership_validators/recursive_test.rb
23
+
24
+ # run OpenLDAP tests by default
25
+ $ export TESTENV=openldap
26
+ $ export TESTENV=$ip
27
+
28
+ # now run tests without having to set ENV variables
29
+ $ time bundle exec rake
30
+ ```
31
+
32
+ You may need to ` gem install vagrant ` first in order to provision the VM.
You can’t perform that action at this time.
0 commit comments