Remove TestOpenStackClientV3 from nova functional tests
This patch removes TestOpenStackClientV3 from all the functional tests. And remove the v3 from the class name. Change-Id: Ic0f50e5a08d476b6352c6af166ad5873981dbaea Partial-Bug: #1462901
This commit is contained in:
parent
347ebb20e3
commit
597b9e2522
|
@ -19,8 +19,6 @@ from oslo_serialization import jsonutils
|
|||
import requests
|
||||
import six
|
||||
|
||||
from nova.tests.unit.image import fake
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -350,34 +348,3 @@ class TestOpenStackClient(object):
|
|||
|
||||
def delete_server_group(self, group_id):
|
||||
self.api_delete('/os-server-groups/%s' % group_id)
|
||||
|
||||
|
||||
class TestOpenStackClientV3(TestOpenStackClient):
|
||||
"""Simple OpenStack v3 API Client.
|
||||
|
||||
This is a really basic OpenStack API client that is under our control,
|
||||
so we can make changes / insert hooks for testing.
|
||||
|
||||
Note that the V3 API does not have an image API and so it is
|
||||
not possible to query the api for the image information.
|
||||
So instead we just access the fake image service used by the unittests
|
||||
directly.
|
||||
|
||||
"""
|
||||
|
||||
def get_image(self, image_id):
|
||||
return fake._fakeImageService.show(None, image_id)
|
||||
|
||||
def get_images(self, detail=True):
|
||||
return fake._fakeImageService.detail(None)
|
||||
|
||||
def post_image(self, image):
|
||||
raise NotImplementedError
|
||||
|
||||
def delete_image(self, image_id):
|
||||
return fake._fakeImageService.delete(None, image_id)
|
||||
|
||||
|
||||
class TestOpenStackClientV3Mixin(object):
|
||||
def _get_test_client(self):
|
||||
return TestOpenStackClientV3('fake', 'fake', self.auth_url)
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from nova.tests.functional.api import client
|
||||
from nova.tests.functional import integrated_helpers
|
||||
|
||||
|
||||
|
@ -32,5 +31,5 @@ class LoginTest(integrated_helpers._IntegratedTestBase):
|
|||
LOG.debug("flavor: %s", flavor)
|
||||
|
||||
|
||||
class LoginTestV3(client.TestOpenStackClientV3Mixin, LoginTest):
|
||||
class LoginTestV21(LoginTest):
|
||||
_api_version = 'v2.1'
|
||||
|
|
|
@ -408,5 +408,5 @@ class ServerGroupAntiAffinityConfTest(ServerGroupTestBase):
|
|||
self.assertEqual(400, failed_server['fault']['code'])
|
||||
|
||||
|
||||
class ServerGroupTestV21(client.TestOpenStackClientV3Mixin, ServerGroupTest):
|
||||
class ServerGroupTestV21(ServerGroupTest):
|
||||
_api_version = 'v2.1'
|
||||
|
|
|
@ -509,5 +509,5 @@ class ServersTest(ServersTestBase):
|
|||
self._delete_server(created_server_id)
|
||||
|
||||
|
||||
class ServersTestV3(client.TestOpenStackClientV3Mixin, ServersTest):
|
||||
class ServersTestV21(ServersTest):
|
||||
_api_version = 'v2.1'
|
||||
|
|
Loading…
Reference in New Issue