diff --git a/.testr.conf b/.testr.conf index 6d83b3c4..f624a4fe 100644 --- a/.testr.conf +++ b/.testr.conf @@ -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:-./castellan/tests} $LISTOPT $IDOPTION test_id_option=--load-list $IDFILE test_list_option=--list diff --git a/castellan/tests/key_manager/__init__.py b/castellan/tests/unit/__init__.py similarity index 100% rename from castellan/tests/key_manager/__init__.py rename to castellan/tests/unit/__init__.py diff --git a/castellan/tests/unit/key_manager/__init__.py b/castellan/tests/unit/key_manager/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/castellan/tests/key_manager/fake.py b/castellan/tests/unit/key_manager/fake.py similarity index 92% rename from castellan/tests/key_manager/fake.py rename to castellan/tests/unit/key_manager/fake.py index a3e2782b..f825c0ad 100644 --- a/castellan/tests/key_manager/fake.py +++ b/castellan/tests/unit/key_manager/fake.py @@ -17,7 +17,7 @@ """Implementation of a fake key manager.""" -from castellan.tests.key_manager import mock_key_manager +from castellan.tests.unit.key_manager import mock_key_manager def fake_api(): diff --git a/castellan/tests/key_manager/mock_key_manager.py b/castellan/tests/unit/key_manager/mock_key_manager.py similarity index 100% rename from castellan/tests/key_manager/mock_key_manager.py rename to castellan/tests/unit/key_manager/mock_key_manager.py diff --git a/castellan/tests/key_manager/test_barbican_key_manager.py b/castellan/tests/unit/key_manager/test_barbican_key_manager.py similarity index 99% rename from castellan/tests/key_manager/test_barbican_key_manager.py rename to castellan/tests/unit/key_manager/test_barbican_key_manager.py index 0098e8c4..0bf21878 100644 --- a/castellan/tests/key_manager/test_barbican_key_manager.py +++ b/castellan/tests/unit/key_manager/test_barbican_key_manager.py @@ -24,7 +24,7 @@ import mock from castellan.common import exception from castellan.key_manager import barbican_key_manager from castellan.key_manager import symmetric_key as key_manager_key -from castellan.tests.key_manager import test_key_manager +from castellan.tests.unit.key_manager import test_key_manager class BarbicanKeyManagerTestCase(test_key_manager.KeyManagerTestCase): diff --git a/castellan/tests/key_manager/test_key.py b/castellan/tests/unit/key_manager/test_key.py similarity index 100% rename from castellan/tests/key_manager/test_key.py rename to castellan/tests/unit/key_manager/test_key.py diff --git a/castellan/tests/key_manager/test_key_manager.py b/castellan/tests/unit/key_manager/test_key_manager.py similarity index 100% rename from castellan/tests/key_manager/test_key_manager.py rename to castellan/tests/unit/key_manager/test_key_manager.py diff --git a/castellan/tests/key_manager/test_mock_key_manager.py b/castellan/tests/unit/key_manager/test_mock_key_manager.py similarity index 95% rename from castellan/tests/key_manager/test_mock_key_manager.py rename to castellan/tests/unit/key_manager/test_mock_key_manager.py index b8fb975c..ef8bf5b6 100644 --- a/castellan/tests/key_manager/test_mock_key_manager.py +++ b/castellan/tests/unit/key_manager/test_mock_key_manager.py @@ -24,8 +24,8 @@ from oslo_context import context from castellan.common import exception from castellan.key_manager import symmetric_key as sym_key -from castellan.tests.key_manager import mock_key_manager as mock_key_mgr -from castellan.tests.key_manager import test_key_manager as test_key_mgr +from castellan.tests.unit.key_manager import mock_key_manager as mock_key_mgr +from castellan.tests.unit.key_manager import test_key_manager as test_key_mgr class MockKeyManagerTestCase(test_key_mgr.KeyManagerTestCase): diff --git a/castellan/tests/key_manager/test_not_implemented_key_manager.py b/castellan/tests/unit/key_manager/test_not_implemented_key_manager.py similarity index 96% rename from castellan/tests/key_manager/test_not_implemented_key_manager.py rename to castellan/tests/unit/key_manager/test_not_implemented_key_manager.py index b021d191..f53a2447 100644 --- a/castellan/tests/key_manager/test_not_implemented_key_manager.py +++ b/castellan/tests/unit/key_manager/test_not_implemented_key_manager.py @@ -18,7 +18,7 @@ Test cases for the not implemented key manager. """ from castellan.key_manager import not_implemented_key_manager -from castellan.tests.key_manager import test_key_manager +from castellan.tests.unit.key_manager import test_key_manager class NotImplementedKeyManagerTestCase(test_key_manager.KeyManagerTestCase): diff --git a/tox.ini b/tox.ini index 0a5f6c99..79c975f8 100644 --- a/tox.ini +++ b/tox.ini @@ -8,6 +8,7 @@ usedevelop = True install_command = pip install -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} + OS_TEST_PATH=./castellan/tests/unit deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = python setup.py testr --slowest --testr-args='{posargs}'