916c55de97
This patch updates the claim tests to validate a response code of http 201, instead of http 200. Tests: bug# 1210301 Change-Id: If736db462225de86e82b08d87024b0da06af1e34 |
||
---|---|---|
.. | ||
claim | ||
common | ||
etc | ||
messages | ||
queue | ||
__init__.py | ||
README.rst |
Marconi System Tests
Marconi's system tests treat Marconi as a black box. In other words, the API calls attempt to simulate an actual user. For example, unlike unit tests, the system tests do not use mock endpoints.
Running the System Tests
Setup a Marconi server. Refer to the Marconi README on how to run Marconi locally, or simply use an existing server.
System tests require the requests package. Run the following to install it: :
pip install -r tools/system-test-requires
cd to the marconi/tests/system directory
Copy etc/system-tests.conf-sample to one of the following locations:
~/.marconi/system-tests.conf /etc/marconi/system-tests.conf
Update the config file to point to the Marconi server you want to run the tests against
If leaving keystone auth enabled, update system-tests.conf with a valid set of credentials.
Now, to run the sytem tests, simply use the nosetests commands, from the marconi/tests/system directory. e.g.:
Run all test suites: :
nosetests -v
Adding New Tests
Add test case to an appropriate test case file: :
queue/test_queue.py messages/test_messages.py claim/test_claims.py
Add any validation logic you might need, to the following utility modules:
- corresponing *fnlib.py (e.g. queue/queuefnlib.py)
- common/functionlib.py (i.e., if the code can be used across multiple test suites)