diff --git a/.testr.conf b/.testr.conf index 8ef6689074..e8f41cd80f 100644 --- a/.testr.conf +++ b/.testr.conf @@ -1,4 +1,4 @@ [DEFAULT] -test_command=OS_LOG_LEVEL=${OS_LOG_LEVEL:-INFO} OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} OS_LOG_DEFAULTS=${OS_LOG_DEFAULTS:-""} ${PYTHON:-python} -m subunit.run discover -t ./ tests $LISTOPT $IDOPTION +test_command=OS_LOG_LEVEL=${OS_LOG_LEVEL:-INFO} OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} OS_LOG_DEFAULTS=${OS_LOG_DEFAULTS:-""} ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./tests/unit} $LISTOPT $IDOPTION test_id_option=--load-list $IDFILE test_list_option=--list diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/test_change_matcher.py b/tests/unit/test_change_matcher.py similarity index 100% rename from tests/test_change_matcher.py rename to tests/unit/test_change_matcher.py diff --git a/tests/test_clonemapper.py b/tests/unit/test_clonemapper.py similarity index 100% rename from tests/test_clonemapper.py rename to tests/unit/test_clonemapper.py diff --git a/tests/test_cloner.py b/tests/unit/test_cloner.py similarity index 100% rename from tests/test_cloner.py rename to tests/unit/test_cloner.py diff --git a/tests/test_cloner_cmd.py b/tests/unit/test_cloner_cmd.py similarity index 100% rename from tests/test_cloner_cmd.py rename to tests/unit/test_cloner_cmd.py diff --git a/tests/test_connection.py b/tests/unit/test_connection.py similarity index 100% rename from tests/test_connection.py rename to tests/unit/test_connection.py diff --git a/tests/test_daemon.py b/tests/unit/test_daemon.py similarity index 100% rename from tests/test_daemon.py rename to tests/unit/test_daemon.py diff --git a/tests/test_gerrit.py b/tests/unit/test_gerrit.py similarity index 97% rename from tests/test_gerrit.py rename to tests/unit/test_gerrit.py index bfbaedc031..999e55d53f 100644 --- a/tests/test_gerrit.py +++ b/tests/unit/test_gerrit.py @@ -20,10 +20,11 @@ try: except ImportError: import mock +import tests.base from tests.base import BaseTestCase from zuul.driver.gerrit.gerritconnection import GerritConnection -FIXTURE_DIR = os.path.join(os.path.dirname(__file__), 'fixtures/gerrit') +FIXTURE_DIR = os.path.join(tests.base.FIXTURE_DIR, 'gerrit') def read_fixture(file): diff --git a/tests/test_layoutvalidator.py b/tests/unit/test_layoutvalidator.py similarity index 100% rename from tests/test_layoutvalidator.py rename to tests/unit/test_layoutvalidator.py diff --git a/tests/test_merger_repo.py b/tests/unit/test_merger_repo.py similarity index 100% rename from tests/test_merger_repo.py rename to tests/unit/test_merger_repo.py diff --git a/tests/test_model.py b/tests/unit/test_model.py similarity index 100% rename from tests/test_model.py rename to tests/unit/test_model.py diff --git a/tests/test_nodepool.py b/tests/unit/test_nodepool.py similarity index 100% rename from tests/test_nodepool.py rename to tests/unit/test_nodepool.py diff --git a/tests/test_openstack.py b/tests/unit/test_openstack.py similarity index 100% rename from tests/test_openstack.py rename to tests/unit/test_openstack.py diff --git a/tests/test_requirements.py b/tests/unit/test_requirements.py similarity index 100% rename from tests/test_requirements.py rename to tests/unit/test_requirements.py diff --git a/tests/test_scheduler.py b/tests/unit/test_scheduler.py similarity index 100% rename from tests/test_scheduler.py rename to tests/unit/test_scheduler.py diff --git a/tests/test_stack_dump.py b/tests/unit/test_stack_dump.py similarity index 100% rename from tests/test_stack_dump.py rename to tests/unit/test_stack_dump.py diff --git a/tests/test_v3.py b/tests/unit/test_v3.py similarity index 100% rename from tests/test_v3.py rename to tests/unit/test_v3.py diff --git a/tests/test_webapp.py b/tests/unit/test_webapp.py similarity index 100% rename from tests/test_webapp.py rename to tests/unit/test_webapp.py diff --git a/tests/test_zuultrigger.py b/tests/unit/test_zuultrigger.py similarity index 100% rename from tests/test_zuultrigger.py rename to tests/unit/test_zuultrigger.py