Move functional tests out of tests/

This moves functional tests out of the tests directory and removes it.

blueprint tests-refactoring

Change-Id: I0e0fb4e914ede02ea2f02fa19cf898888f38b57d
This commit is contained in:
Thomas Herve 2015-06-19 09:55:07 +02:00
parent 14e66fa8fe
commit 85a2f8159f
37 changed files with 5 additions and 53 deletions

View File

@ -2,11 +2,7 @@
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} $JIT_FLAG -m subunit.run discover -t . ./tests $LISTOPT $IDOPTION
OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} $JIT_FLAG -m subunit.run discover -s ./zaqar/tests/unit $LISTOPT $IDOPTION
${PYTHON:-python} $JIT_FLAG -m subunit.run discover -t . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -169,5 +169,5 @@ the ``--verbose`` flag. Verbose output looks similar to the following::
.. _`OpenStack` : http://openstack.org/
.. _`MongoDB` : http://docs.mongodb.org/manual/installation/
.. _`wiki` : https://wiki.openstack.org/wiki/Zaqar
.. _`TESTS_README` : https://github.com/openstack/zaqar/blob/master/tests/functional/README.rst
.. _`TESTS_README` : https://github.com/openstack/zaqar/blob/master/zaqar/tests/functional/README.rst

View File

@ -75,7 +75,7 @@ zaqar.storage.redis.driver.queue.stages =
[nosetests]
where=tests
where=zaqar/tests
verbosity=2
with-doctest = true

View File

@ -1,23 +0,0 @@
# Copyright (c) 2013 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
tests_dir = os.path.abspath(os.path.dirname(__file__))
os.environ.setdefault("ZAQAR_TESTS_DIR", tests_dir)
if "ZAQAR_TESTS_CONFIGS_DIR" not in os.environ:
os.environ["ZAQAR_TESTS_CONFIGS_DIR"] = os.path.join(tests_dir, "etc")

View File

@ -8,8 +8,7 @@ usedevelop = True
# Customize pip command, add -U to force updates.
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
ZAQAR_TESTS_DIR={toxinidir}/tests
ZAQAR_TESTS_CONFIGS_DIR={toxinidir}/tests/etc/
ZAQAR_TESTS_CONFIGS_DIR={toxinidir}/zaqar/tests/etc/
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt

View File

@ -12,16 +12,13 @@ Running functional tests (With Tox)
#. Setup a Zaqar server. Refer to the Zaqar `README`_ on
how to run Zaqar locally, or simply use an existing server.
#. Change `$ZAQAR_TESTS_CONFIGS_DIR/functional-tests.conf` and
set `run_tests` to True.
#. Run tests. ::
$ tox
#. Filter tests. ::
$ tox -- --tests tests.functional.wsgi.v1.test_messages
$ tox -- zaqar.tests.functional.wsgi.v1.test_messages
#. Run tests for specific environments. ::

0
zaqar/tests/functional/http.py Executable file → Normal file
View File

View File

@ -1,17 +0,0 @@
# Copyright (c) 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
from zaqar.tests.unit.transport.websocket.v1_1 import test_queue_lifecycle as l
TestQueueLifecycleMongoDB = l.TestQueueLifecycleMongoDB