File: README.md

package info (click to toggle)
ruby-net-ldap 0.12.1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 616 kB
  • ctags: 551
  • sloc: ruby: 4,064; sh: 117; makefile: 4
file content (32 lines) | stat: -rw-r--r-- 955 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Local OpenLDAP Integration Testing

Set up a [Vagrant](http://www.vagrantup.com/) VM to run integration tests against OpenLDAP locally.

To run integration tests locally:

``` bash
# start VM (from the correct directory)
$ cd test/support/vm/openldap/
$ vagrant up

# get the IP address of the VM
$ ip=$(vagrant ssh -- "ifconfig eth1 | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n1")

# change back to root project directory
$ cd ../../../..

# run all tests, including integration tests
$ time INTEGRATION=openldap INTEGRATION_HOST=$ip bundle exec rake

# run a specific integration test file
$ time INTEGRATION=openldap INTEGRATION_HOST=$ip bundle exec ruby test/integration/test_search.rb

# run integration tests by default
$ export INTEGRATION=openldap
$ export INTEGRATION_HOST=$ip

# now run tests without having to set ENV variables
$ time bundle exec rake
```

You may need to `gem install vagrant` first in order to provision the VM.