=======================================
Development setup for lovely.testlayers
=======================================

Basics
======

Development sandbox
-------------------
This project uses buildout, so in order to start developing run the
following in this directory::

 python bootstrap.py
 ./bin/buildout


Run tests
---------
To run tests use::

 ./bin/test

Note that some tests require internet access and are not run by
default. To run all tests use::

 ./bin/test --all


Run tests with tox
------------------
To test against multiple python versions tox can be used. The python
interpreter need to be available in the `$PATH` variable as `python2.7`,
`python3.3` and `pypy`. Execute tox using::

 ./bin/tox

To limit the tox test to a single python interpreter use it like this::

 ./bin/tox -e py27


Modules
=======


MongoDB
-------
The MongoDB tests are separated and by default not included if buildout is run.
To install MongoDB and its test suite, execute::

    bin/buildout install mongodb mongodb-test

And then run the tests with::

    bin/test-mongodb --suite-name=mongodb_suite


OpenLDAP
--------
The OpenLDAP tests are separated and by default not included if buildout is run.
To install the OpenLDAP test suite, execute::

    bin/buildout install openldap-test

And then run the tests with::

    bin/test-openldap


The relevant OpenLDAP system packages are not installed by buildout and have to be installed separately.

Debian Linux::

    aptitude install slapd openldap-utils libldap2-dev libsasl2-dev

CentOS Linux::

    yum install openldap-servers openldap-clients

Mac OS X, Macports::

    sudo port install openldap


ApacheDS
--------
The ApacheDS tests are separated and by default not included if buildout is run.
To install the ApacheDS test suite, execute::

    bin/buildout install apacheds-test

And then run the tests with::

    bin/test-apacheds


The relevant ApacheDS system packages are not installed by buildout and have to be installed separately.

    - https://directory.apache.org/apacheds/downloads.html

Also, a Java runtime is required::

    aptitude install default-jre-headless

Please note even when running ApacheDS, the provisioning of LDIF files depends on "ldapadd",
to be installed through ``openldap-utils`` or ``openldap-clients`` packages.

