From fa61cfe16714512b84dc68f9463663f6956d3ce9 Mon Sep 17 00:00:00 2001 From: Paul Glass Date: Tue, 18 Aug 2015 13:47:13 -0500 Subject: [PATCH] Update docs for the functional tests * Call them "functional tests" instead of "tempest tests" * The functional tests are run with tox now * Updated the config file Change-Id: Ibf9e986ac63e277e1b4f5f319113b4558be2a900 --- doc/source/functional-tests.rst | 86 +++++++++++++++++++++++++++++++++ doc/source/index.rst | 2 +- doc/source/tempest.rst | 72 --------------------------- 3 files changed, 87 insertions(+), 73 deletions(-) create mode 100644 doc/source/functional-tests.rst delete mode 100644 doc/source/tempest.rst diff --git a/doc/source/functional-tests.rst b/doc/source/functional-tests.rst new file mode 100644 index 000000000..6d7f34cc4 --- /dev/null +++ b/doc/source/functional-tests.rst @@ -0,0 +1,86 @@ +.. _functional-tests: + +=================== + Functional tests +=================== + +The functional tests run against a live Designate, making real requests and +verifying they were successful. + +Installation +============ + +The functional tests are written using ``tempest-lib``. All the dependencies +should be in the requirements files: + +:: + + cd designate + pip install -r requirements.txt -r test-requirements.txt + pip install -e . + +Configuration +============= + +The Tempest tests require a config file. The config specifies the keystone +endpoint to authenticate against, or to run in noauth mode against a Designate +without keystone. + +Set the ``TEMPEST_CONFIG`` environment variable to specify where the config +file is: + +:: + + export TEMPEST_CONFIG=tempest.conf + + +The config file should look like the following: + +:: + + [identity] + # Replace these with values that represent your identity configuration + uri = http://localhost:5000/v2.0 + uri_v3 = http://localhost:5000/v3 + auth_version = v2 + region = RegionOne + + username = demo + tenant_name = demo + password = password + domain_name = Default + + alt_username = alt_demo + alt_tenant_name = alt_demo + alt_password = password + alt_domain_name = Default + + admin_username = admin + admin_tenant_name = admin + admin_password = password + admin_domain_name = Default + + [noauth] + # set this to True to run against designate in noauth mode + use_noauth = False + designate_endpoint = http://127.0.0.1:9001 + tenant_id = demo + alt_tenant_id = alt_demo + admin_tenant_id = admin + + [designate] + # the tests will verify changes propagate out to these nameservers + nameservers = 127.0.0.1:53,127.0.0.2:53 + + +Running the tests +================= + +Make sure to set the ``TEMPEST_CONFIG`` environment variable to point to your +test config file. + +Then run the tests with tox (you may need to ``pip install tox``): + +:: + + tox -e functional diff --git a/doc/source/index.rst b/doc/source/index.rst index 0dcae5ce2..549080344 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -50,7 +50,7 @@ Reference Documentation glossary backends integrations - tempest + functional-tests gmr support-matrix diff --git a/doc/source/tempest.rst b/doc/source/tempest.rst deleted file mode 100644 index baf80c52a..000000000 --- a/doc/source/tempest.rst +++ /dev/null @@ -1,72 +0,0 @@ -.. _tempest: - -=============== - Tempest tests -=============== - -The Tempest tests are functional tests that hit a live Designate endpoint and -verify responses. - -Installation -============ - -The tests depend on both ``tempest-lib`` and ``tempest``: - -:: - - # tempest-lib is in test-requirements.txt - cd designate - pip install -r requirements.txt -r test-requirements.txt - python setup.py develop - -Configuration -============= - -The Tempest tests look for the ``TEMPEST_CONFIG`` environment variable, or the -file ``tempest.conf`` in the current directory which contains the config below. -Set ``use_noauth=True`` to hit a Designate endpoint without Keystone. - -:: - - [identity] - # Replace these with values that represent your identity configuration - uri=http://localhost:5000/v2.0 - uri_v3=http://localhost:5000/v3 - auth_version=v2 - region=RegionOne - - username=admin - tenant_name=admin - password=password - domain_name=Default - - admin_username=admin - admin_tenant_name=admin - admin_password=password - admin_domain_name=Default - - [noauth] - use_noauth=False - designate_endpoint=http://127.0.0.1:9001 - tenant_id='noauth-project' - - -Execution -========= - -The tests should work with any test runner, like ``nose``: - -:: - - cd functionaltests - pip install nose - nosetests --logging-level=WARN api/ - -A file ``.testr.conf`` is included for use with ``testr``: - -:: - - cd functionaltests - pip install testrepository - testr init - testr run