poppy/tests/api
Jenkins dd84c7bcf4 Merge "Make the flavor provider used in api tests configurable" 2015-01-06 16:58:03 +00:00
..
flavors Make the flavor provider used in api tests configurable 2015-01-06 02:48:13 +00:00
health Updates to API tests 2014-12-15 13:12:52 -05:00
services Merge "Make the flavor provider used in api tests configurable" 2015-01-06 16:58:03 +00:00
utils Make the flavor provider used in api tests configurable 2015-01-06 02:48:13 +00:00
README.rst Added tox environment for running api tests using docker 2014-12-02 17:23:16 -05:00
__init__.py Add API Test Structure 2014-07-14 13:34:36 -04:00
base.py Make the flavor provider used in api tests configurable 2015-01-06 02:48:13 +00:00
providers.py Add API tests for get service endpoint 2014-10-06 13:13:43 -04:00
requirements.txt Exclude API tests from tox. 2014-07-18 10:23:04 -04:00

README.rst

API Tests

The API tests + test an actual API against a running environment. + are black box tests + can be used to test any running instance of poppy server (dev, test, prod, local instance, containerized instance)

To run the tests

  1. Install the dependencies:

    pip install -r requirements.txt
  2. Set the following environment variables:

    export CAFE_CONFIG_FILE_PATH=~/.poppy/tests.conf
    export CAFE_ROOT_LOG_PATH=~/.poppy/logs
    export CAFE_TEST_LOG_PATH=~/.poppy/logs
  3. Copy the api.conf file to the path set by CAFE_CONFIG_FILE_PATH:

    cp tests/etc/api.conf ~/.poppy/tests.conf
  4. Once you are ready to run the tests:

    cd tests/api
    nosetests

Tox Support

The API tests require cassandra running in your local machine, in order to run via tox. It is assumed you already have the Cassandra instance up & running locally. You can make the API tests part of tox, by overriding the default positional argument in tox.ini:: example : tox -- --exclude=None

Alternatively, you can run tox with docker containers running Cassandra:

This will require docker (or boot2docker for MacOSX) to already be installed on the system.
Dont forget to update your ~/.poppy/tests.conf to point to your docker ip.

example : tox -e apidocker