From f9725801d892f845e1cb9314a1086357b0c72f9a Mon Sep 17 00:00:00 2001 From: fumihiko kakuma Date: Thu, 17 Nov 2016 14:29:02 +0900 Subject: [PATCH] Allow to run multiple kind of tempest tests While I consider to add a scenario test to be executed on tempest, base_path in tempest/plugin.py is fixed to api directory. So api test should be put under tests/tempest. Realated Change-Id: Ieb710181c1e496742e1e019a6238e5e0bd922971 Change-Id: I9923775806b095455ed3723e71410287bdf6cb1e --- neutron_dynamic_routing/tests/contrib/gate_hook.sh | 4 ---- neutron_dynamic_routing/tests/{ => tempest}/api/__init__.py | 0 .../tests/{ => tempest}/api/test_bgp_speaker_extensions.py | 0 .../{ => tempest}/api/test_bgp_speaker_extensions_negative.py | 2 +- neutron_dynamic_routing/tests/tempest/plugin.py | 2 +- 5 files changed, 2 insertions(+), 6 deletions(-) rename neutron_dynamic_routing/tests/{ => tempest}/api/__init__.py (100%) rename neutron_dynamic_routing/tests/{ => tempest}/api/test_bgp_speaker_extensions.py (100%) rename neutron_dynamic_routing/tests/{ => tempest}/api/test_bgp_speaker_extensions_negative.py (98%) diff --git a/neutron_dynamic_routing/tests/contrib/gate_hook.sh b/neutron_dynamic_routing/tests/contrib/gate_hook.sh index 12a6423b..0da5e40a 100644 --- a/neutron_dynamic_routing/tests/contrib/gate_hook.sh +++ b/neutron_dynamic_routing/tests/contrib/gate_hook.sh @@ -26,8 +26,4 @@ then # Make the workspace owned by the stack user sudo chown -R $STACK_USER:$STACK_USER $BASE - -else - echo "Unrecognized environment $VENV". - exit 1 fi diff --git a/neutron_dynamic_routing/tests/api/__init__.py b/neutron_dynamic_routing/tests/tempest/api/__init__.py similarity index 100% rename from neutron_dynamic_routing/tests/api/__init__.py rename to neutron_dynamic_routing/tests/tempest/api/__init__.py diff --git a/neutron_dynamic_routing/tests/api/test_bgp_speaker_extensions.py b/neutron_dynamic_routing/tests/tempest/api/test_bgp_speaker_extensions.py similarity index 100% rename from neutron_dynamic_routing/tests/api/test_bgp_speaker_extensions.py rename to neutron_dynamic_routing/tests/tempest/api/test_bgp_speaker_extensions.py diff --git a/neutron_dynamic_routing/tests/api/test_bgp_speaker_extensions_negative.py b/neutron_dynamic_routing/tests/tempest/api/test_bgp_speaker_extensions_negative.py similarity index 98% rename from neutron_dynamic_routing/tests/api/test_bgp_speaker_extensions_negative.py rename to neutron_dynamic_routing/tests/tempest/api/test_bgp_speaker_extensions_negative.py index 9b7cefee..70ec9e61 100644 --- a/neutron_dynamic_routing/tests/api/test_bgp_speaker_extensions_negative.py +++ b/neutron_dynamic_routing/tests/tempest/api/test_bgp_speaker_extensions_negative.py @@ -17,7 +17,7 @@ import netaddr from tempest.lib import exceptions as lib_exc from tempest import test -from neutron_dynamic_routing.tests.api import test_bgp_speaker_extensions as test_base # noqa +from neutron_dynamic_routing.tests.tempest.api import test_bgp_speaker_extensions as test_base # noqa class BgpSpeakerTestJSONNegative(test_base.BgpSpeakerTestJSONBase): diff --git a/neutron_dynamic_routing/tests/tempest/plugin.py b/neutron_dynamic_routing/tests/tempest/plugin.py index 373bcbf2..40ee39d3 100644 --- a/neutron_dynamic_routing/tests/tempest/plugin.py +++ b/neutron_dynamic_routing/tests/tempest/plugin.py @@ -23,7 +23,7 @@ class NeutronDynamicRoutingTempestPlugin(plugins.TempestPlugin): def load_tests(self): base_path = os.path.split(os.path.dirname( os.path.abspath(neutron_dynamic_routing.__file__)))[0] - test_dir = "neutron_dynamic_routing/tests/api" + test_dir = "neutron_dynamic_routing/tests/tempest" full_test_dir = os.path.join(base_path, test_dir) return full_test_dir, base_path