tests: separate between functional and unit
Just move the tests into two separate directories and add instructions on how to run them. Change-Id: I45dbed3306c35ce49116654534609cf81b441149
This commit is contained in:
parent
4a3b5904d7
commit
4aba28b269
@ -2,6 +2,6 @@
|
||||
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} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
|
||||
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./ooi/tests} $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
||||
test_list_option=--list
|
||||
|
22
HACKING.rst
22
HACKING.rst
@ -1,4 +1,20 @@
|
||||
ooi Style Commandments
|
||||
===============================================
|
||||
ooi hacking guidelines
|
||||
======================
|
||||
|
||||
Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
|
||||
Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
|
||||
|
||||
Code style is enforced and unit and functional testing
|
||||
are required. To run all of them , just execute:
|
||||
|
||||
$ tox
|
||||
|
||||
with no arguments.
|
||||
|
||||
If you wish to execute only functional (note that this is not integration so we
|
||||
are only using test doubles here) testing, run:
|
||||
|
||||
$ tox -e functional
|
||||
|
||||
Syntax checks can be run with:
|
||||
|
||||
$ tox -e pep8
|
||||
|
@ -5,7 +5,7 @@ ooi is an implementation the Open Grid Forum's
|
||||
[Open Cloud Computing Interface (OCCI)](http://www.occi-wg.org)
|
||||
for [OpenStack](http://www.openstack.org).
|
||||
|
||||
The documentation for OOI is available at
|
||||
The documentation for OOI is available at
|
||||
http://ooi.readthedocs.org/en/latest
|
||||
|
||||
In the unfortunate event that bugs are discovered, they should
|
||||
@ -17,4 +17,3 @@ Developers wishing to work on the ooi project should always base their work on
|
||||
the latest ooi code, available from the master GIT repository at:
|
||||
|
||||
https://git.openstack.org/cgit/openstack/ooi
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
import uuid
|
||||
|
||||
from ooi.tests import fakes
|
||||
from ooi.tests.middleware import test_middleware
|
||||
from ooi.tests.functional.middleware import test_middleware
|
||||
from ooi import utils
|
||||
|
||||
|
@ -23,7 +23,7 @@ from ooi.api import network_link
|
||||
from ooi import exception
|
||||
from ooi.occi.core import collection
|
||||
from ooi.tests import fakes_network as fakes
|
||||
from ooi.tests.middleware import test_middleware
|
||||
from ooi.tests.functional.middleware import test_middleware
|
||||
from ooi import utils
|
||||
from ooi import wsgi
|
||||
|
@ -21,7 +21,7 @@ from ooi.api import helpers_neutron
|
||||
from ooi.api import network
|
||||
from ooi.occi.core import collection
|
||||
from ooi.tests import fakes_network as fakes
|
||||
from ooi.tests.middleware import test_middleware
|
||||
from ooi.tests.functional.middleware import test_middleware
|
||||
from ooi import utils
|
||||
from ooi import wsgi
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
from ooi.tests import fakes
|
||||
from ooi.tests.middleware import test_middleware
|
||||
from ooi.tests.functional.middleware import test_middleware
|
||||
|
||||
|
||||
class TestQueryController(test_middleware.TestMiddleware):
|
@ -17,7 +17,7 @@
|
||||
import uuid
|
||||
|
||||
from ooi.tests import fakes
|
||||
from ooi.tests.middleware import test_middleware
|
||||
from ooi.tests.functional.middleware import test_middleware
|
||||
from ooi import utils
|
||||
|
||||
|
@ -19,7 +19,7 @@ import uuid
|
||||
import mock
|
||||
|
||||
from ooi.tests import fakes
|
||||
from ooi.tests.middleware import test_middleware
|
||||
from ooi.tests.functional.middleware import test_middleware
|
||||
from ooi import utils
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
import uuid
|
||||
|
||||
from ooi.tests import fakes
|
||||
from ooi.tests.middleware import test_middleware
|
||||
from ooi.tests.functional.middleware import test_middleware
|
||||
from ooi import utils
|
||||
|
||||
|
||||
|
@ -23,7 +23,7 @@ import webob
|
||||
|
||||
from ooi.api import helpers
|
||||
from ooi.tests import fakes_network as fakes
|
||||
from ooi.tests.middleware import test_middleware
|
||||
from ooi.tests.functional.middleware import test_middleware
|
||||
from ooi import utils
|
||||
from ooi import wsgi
|
||||
|
||||
@ -327,4 +327,4 @@ class TestFunctionalNova(test_middleware.TestMiddleware):
|
||||
method="DELETE")
|
||||
resp = req.get_response(self.app)
|
||||
self.assertEqual(204, resp.status_code)
|
||||
self.assertDefaults(resp)
|
||||
self.assertDefaults(resp)
|
||||
|
0
ooi/tests/unit/controllers/__init__.py
Normal file
0
ooi/tests/unit/controllers/__init__.py
Normal file
0
ooi/tests/unit/occi/__init__.py
Normal file
0
ooi/tests/unit/occi/__init__.py
Normal file
20
tox.ini
20
tox.ini
@ -1,16 +1,32 @@
|
||||
[tox]
|
||||
minversion = 1.6
|
||||
envlist = py34,py27,pep8
|
||||
envlist = py34,py27,pep8,functional
|
||||
skipsdist = True
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
install_command = pip install -U {opts} {packages}
|
||||
whitelist_externals = bash
|
||||
find
|
||||
rm
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
OS_TEST_PATH=./ooi/tests/unit
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
||||
commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
python setup.py testr --slowest --testr-args='{posargs}'
|
||||
|
||||
[testenv:functional]
|
||||
usedevelop = True
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
OS_TEST_PATH=./ooi/tests/functional
|
||||
LANGUAGE=en_US
|
||||
commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
python setup.py testr --slowest --testr-args='{posargs}'
|
||||
|
||||
|
||||
[testenv:pep8]
|
||||
commands = flake8
|
||||
|
Loading…
x
Reference in New Issue
Block a user