xivo-dird is a service to query many directory sources simultaneously using a simple REST API.
The xivo/dird image can be built using the following command:
% docker build -t xivo/dird .
The xivo/dird
image contains a configuration file to listen to HTTP requests
on "0.0.0.0". To change this behavior, remove or edit the file
/etc/xivo-dird/conf.d/listen.yml
xivo-dird contains unittests and integration tests
Dependencies to run the unittests are in the requirements.txt
file.
% pip install -r requirements.txt -r test-requirements.txt
To run the unittests
% nosetests xivo_dird
You need:
- docker
% pip install -r test-requirements.txt
A docker image named dird-test
is required to execute the test suite.
To build this image execute:
% cd integration_tests
% make test-setup
% make test-image
There are two steps in preparing the integration tests:
- `make test-setup`: time consuming, but only needs to be run when
dependencies of xivo-dird change in any way.
- `make test-image`: a lot faster, and needs to be run when the code of
xivo-dird changes.
To execute the integration tests execute:
% nosetests integration_tests