diff --git a/.stestr.conf b/.stestr.conf index 30b8d1b4..bdae8ab5 100644 --- a/.stestr.conf +++ b/.stestr.conf @@ -1,3 +1,3 @@ [DEFAULT] -test_path=./whitebox_tempest_plugin/tests/unit +test_path=./whitebox_tempest_plugin/tests top_dir=./ diff --git a/whitebox_tempest_plugin/tests/scenario/__init__.py b/whitebox_tempest_plugin/api/__init__.py similarity index 100% rename from whitebox_tempest_plugin/tests/scenario/__init__.py rename to whitebox_tempest_plugin/api/__init__.py diff --git a/whitebox_tempest_plugin/tests/unit/__init__.py b/whitebox_tempest_plugin/api/compute/__init__.py similarity index 100% rename from whitebox_tempest_plugin/tests/unit/__init__.py rename to whitebox_tempest_plugin/api/compute/__init__.py diff --git a/whitebox_tempest_plugin/tests/scenario/base.py b/whitebox_tempest_plugin/api/compute/base.py similarity index 92% rename from whitebox_tempest_plugin/tests/scenario/base.py rename to whitebox_tempest_plugin/api/compute/base.py index 77bfb4d2..8edc8a96 100644 --- a/whitebox_tempest_plugin/tests/scenario/base.py +++ b/whitebox_tempest_plugin/api/compute/base.py @@ -14,15 +14,15 @@ # under the License. from oslo_log import log as logging +from tempest.api.compute import base from tempest import config -from tempest.scenario import manager CONF = config.CONF LOG = logging.getLogger(__name__) -class BaseTest(manager.ScenarioTest): +class BaseTest(base.BaseV2ComputeTest): credentials = ['primary', 'admin'] diff --git a/whitebox_tempest_plugin/tests/scenario/test_pointer_device_type.py b/whitebox_tempest_plugin/api/compute/test_pointer_device_type.py similarity index 94% rename from whitebox_tempest_plugin/tests/scenario/test_pointer_device_type.py rename to whitebox_tempest_plugin/api/compute/test_pointer_device_type.py index cf0bbba0..c4610b69 100644 --- a/whitebox_tempest_plugin/tests/scenario/test_pointer_device_type.py +++ b/whitebox_tempest_plugin/api/compute/test_pointer_device_type.py @@ -23,12 +23,11 @@ # pointer_model=ps2mouse from oslo_log import log as logging -from tempest.common import utils from tempest import config +from whitebox_tempest_plugin.api.compute import base from whitebox_tempest_plugin.common import utils as whitebox_utils from whitebox_tempest_plugin.services import clients -from whitebox_tempest_plugin.tests.scenario import base CONF = config.CONF LOG = logging.getLogger(__name__) @@ -66,12 +65,12 @@ class PointerDeviceTypeFromImages(base.BaseTest): self.assertTrue(tablet in output) self.assertTrue(mouse in output) - @utils.services('compute') def test_pointer_device_type_from_images(self): # TODO(stephenfin): I'm pretty sure this modifying the main image. We # shouldn't be doing that. image_id = CONF.compute.image_ref self._set_image_metadata_item(image_id) - server = self.create_server(image_id=image_id) + server = self.create_test_server(image_id=image_id, + wait_until='ACTIVE') self._verify_pointer_device_type_from_images(server['id']) diff --git a/whitebox_tempest_plugin/plugin.py b/whitebox_tempest_plugin/plugin.py index 3bcc0048..d9054489 100644 --- a/whitebox_tempest_plugin/plugin.py +++ b/whitebox_tempest_plugin/plugin.py @@ -27,7 +27,7 @@ class WhiteboxTempestPlugin(plugins.TempestPlugin): def load_tests(self): base_path = os.path.split(os.path.dirname( os.path.abspath(__file__)))[0] - test_dir = 'whitebox_tempest_plugin/tests' + test_dir = 'whitebox_tempest_plugin/api' full_test_dir = os.path.join(base_path, test_dir) return full_test_dir, base_path diff --git a/whitebox_tempest_plugin/tests/unit/base.py b/whitebox_tempest_plugin/tests/base.py similarity index 100% rename from whitebox_tempest_plugin/tests/unit/base.py rename to whitebox_tempest_plugin/tests/base.py diff --git a/whitebox_tempest_plugin/tests/unit/test_utils.py b/whitebox_tempest_plugin/tests/test_utils.py similarity index 97% rename from whitebox_tempest_plugin/tests/unit/test_utils.py rename to whitebox_tempest_plugin/tests/test_utils.py index 0f52fddc..952c3eff 100644 --- a/whitebox_tempest_plugin/tests/unit/test_utils.py +++ b/whitebox_tempest_plugin/tests/test_utils.py @@ -15,7 +15,7 @@ import mock from whitebox_tempest_plugin.common import utils -from whitebox_tempest_plugin.tests.unit import base +from whitebox_tempest_plugin.tests import base class UtilsTestCase(base.WhiteboxPluginTestCase):