Merge "Clean up the changes of os.environ in functional tests"
This commit is contained in:
commit
d04a7cf92a
openstackclient/tests/functional
common
compute/v2
identity
image
network/v2
common.pytest_floating_ip.pytest_ip_availability.pytest_network.pytest_network_meter_rule.pytest_network_qos_policy.pytest_network_qos_rule.pytest_network_rbac.pytest_network_segment.pytest_port.pytest_security_group.pytest_security_group_rule.pytest_subnet.py
object/v1
volume
@ -25,6 +25,7 @@ class ExtensionTests(base.TestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
super(ExtensionTests, cls).setUpClass()
|
||||||
cls.haz_network = base.is_service_enabled('network')
|
cls.haz_network = base.is_service_enabled('network')
|
||||||
|
|
||||||
def test_extension_list_compute(self):
|
def test_extension_list_compute(self):
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import fixtures
|
||||||
|
|
||||||
from openstackclient.tests.functional import base
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
@ -76,10 +78,11 @@ class HelpTests(base.TestCase):
|
|||||||
|
|
||||||
def test_commands_help_no_auth(self):
|
def test_commands_help_no_auth(self):
|
||||||
"""Check help commands without auth info."""
|
"""Check help commands without auth info."""
|
||||||
# Pop all auth info
|
# Pop all auth info. os.environ will be changed in loop, so do not
|
||||||
auth_info = {key: os.environ.pop(key)
|
# replace os.environ.keys() to os.environ
|
||||||
for key in os.environ.keys()
|
for key in os.environ.keys():
|
||||||
if key.startswith('OS_')}
|
if key.startswith('OS_'):
|
||||||
|
self.useFixture(fixtures.EnvironmentVariable(key, None))
|
||||||
|
|
||||||
raw_output = self.openstack('help')
|
raw_output = self.openstack('help')
|
||||||
self.assertIn('usage: openstack', raw_output)
|
self.assertIn('usage: openstack', raw_output)
|
||||||
@ -115,6 +118,3 @@ class HelpTests(base.TestCase):
|
|||||||
self.assertIn('List containers', raw_output)
|
self.assertIn('List containers', raw_output)
|
||||||
raw_output = self.openstack('container list --help')
|
raw_output = self.openstack('container list --help')
|
||||||
self.assertIn('List containers', raw_output)
|
self.assertIn('List containers', raw_output)
|
||||||
|
|
||||||
# Restore auth info
|
|
||||||
os.environ.update(auth_info)
|
|
||||||
|
@ -26,6 +26,7 @@ class QuotaTests(base.TestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
super(QuotaTests, cls).setUpClass()
|
||||||
cls.haz_network = base.is_service_enabled('network')
|
cls.haz_network = base.is_service_enabled('network')
|
||||||
cls.PROJECT_NAME =\
|
cls.PROJECT_NAME =\
|
||||||
cls.get_openstack_configuration_value('auth.project_name')
|
cls.get_openstack_configuration_value('auth.project_name')
|
||||||
|
@ -23,6 +23,7 @@ class FlavorTests(base.TestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
super(FlavorTests, cls).setUpClass()
|
||||||
# Make a project
|
# Make a project
|
||||||
cmd_output = json.loads(cls.openstack(
|
cmd_output = json.loads(cls.openstack(
|
||||||
"project create -f json --enable " + cls.PROJECT_NAME
|
"project create -f json --enable " + cls.PROJECT_NAME
|
||||||
@ -31,8 +32,11 @@ class FlavorTests(base.TestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
raw_output = cls.openstack("project delete " + cls.PROJECT_NAME)
|
try:
|
||||||
cls.assertOutput('', raw_output)
|
raw_output = cls.openstack("project delete " + cls.PROJECT_NAME)
|
||||||
|
cls.assertOutput('', raw_output)
|
||||||
|
finally:
|
||||||
|
super(FlavorTests, cls).tearDownClass()
|
||||||
|
|
||||||
def test_flavor_delete(self):
|
def test_flavor_delete(self):
|
||||||
"""Test create w/project, delete multiple"""
|
"""Test create w/project, delete multiple"""
|
||||||
|
@ -25,6 +25,7 @@ class ServerTests(common.ComputeTestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
super(ServerTests, cls).setUpClass()
|
||||||
cls.haz_network = base.is_service_enabled('network')
|
cls.haz_network = base.is_service_enabled('network')
|
||||||
|
|
||||||
def test_server_list(self):
|
def test_server_list(self):
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import fixtures
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions as tempest_exceptions
|
from tempest.lib import exceptions as tempest_exceptions
|
||||||
|
|
||||||
@ -41,17 +42,13 @@ class IdentityTests(base.TestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
# prepare v2 env
|
super(IdentityTests, cls).setUpClass()
|
||||||
os.environ['OS_IDENTITY_API_VERSION'] = '2.0'
|
|
||||||
auth_url = os.environ.get('OS_AUTH_URL')
|
|
||||||
if auth_url:
|
|
||||||
os.environ['OS_AUTH_URL'] = auth_url.replace('v3', 'v2.0')
|
|
||||||
|
|
||||||
# create dummy project
|
# create dummy project
|
||||||
cls.project_name = data_utils.rand_name('TestProject')
|
cls.project_name = data_utils.rand_name('TestProject')
|
||||||
cls.project_description = data_utils.rand_name('description')
|
cls.project_description = data_utils.rand_name('description')
|
||||||
try:
|
try:
|
||||||
cls.openstack(
|
cls.openstack(
|
||||||
|
'--os-identity-api-version 2 '
|
||||||
'project create '
|
'project create '
|
||||||
'--description %(description)s '
|
'--description %(description)s '
|
||||||
'--enable '
|
'--enable '
|
||||||
@ -69,7 +66,25 @@ class IdentityTests(base.TestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
cls.openstack('project delete %s' % cls.project_name)
|
try:
|
||||||
|
cls.openstack(
|
||||||
|
'--os-identity-api-version 2 '
|
||||||
|
'project delete %s' % cls.project_name)
|
||||||
|
finally:
|
||||||
|
super(IdentityTests, cls).tearDownClass()
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
super(IdentityTests, self).setUp()
|
||||||
|
# prepare v2 env
|
||||||
|
ver_fixture = fixtures.EnvironmentVariable(
|
||||||
|
'OS_IDENTITY_API_VERSION', '2.0')
|
||||||
|
self.useFixture(ver_fixture)
|
||||||
|
auth_url = os.environ.get('OS_AUTH_URL')
|
||||||
|
if auth_url:
|
||||||
|
auth_url_fixture = fixtures.EnvironmentVariable(
|
||||||
|
'OS_AUTH_URL', auth_url.replace('v3', 'v2.0')
|
||||||
|
)
|
||||||
|
self.useFixture(auth_url_fixture)
|
||||||
|
|
||||||
def _create_dummy_project(self, add_clean_up=True):
|
def _create_dummy_project(self, add_clean_up=True):
|
||||||
project_name = data_utils.rand_name('TestProject')
|
project_name = data_utils.rand_name('TestProject')
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import fixtures
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
|
|
||||||
from openstackclient.tests.functional import base
|
from openstackclient.tests.functional import base
|
||||||
@ -53,16 +54,12 @@ class IdentityTests(base.TestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
# prepare v3 env
|
super(IdentityTests, cls).setUpClass()
|
||||||
os.environ['OS_IDENTITY_API_VERSION'] = '3'
|
|
||||||
auth_url = os.environ.get('OS_AUTH_URL')
|
|
||||||
if auth_url:
|
|
||||||
os.environ['OS_AUTH_URL'] = auth_url.replace('v2.0', 'v3')
|
|
||||||
|
|
||||||
# create dummy domain
|
# create dummy domain
|
||||||
cls.domain_name = data_utils.rand_name('TestDomain')
|
cls.domain_name = data_utils.rand_name('TestDomain')
|
||||||
cls.domain_description = data_utils.rand_name('description')
|
cls.domain_description = data_utils.rand_name('description')
|
||||||
cls.openstack(
|
cls.openstack(
|
||||||
|
'--os-identity-api-version 3 '
|
||||||
'domain create '
|
'domain create '
|
||||||
'--description %(description)s '
|
'--description %(description)s '
|
||||||
'--enable '
|
'--enable '
|
||||||
@ -73,6 +70,7 @@ class IdentityTests(base.TestCase):
|
|||||||
cls.project_name = data_utils.rand_name('TestProject')
|
cls.project_name = data_utils.rand_name('TestProject')
|
||||||
cls.project_description = data_utils.rand_name('description')
|
cls.project_description = data_utils.rand_name('description')
|
||||||
cls.openstack(
|
cls.openstack(
|
||||||
|
'--os-identity-api-version 3 '
|
||||||
'project create '
|
'project create '
|
||||||
'--domain %(domain)s '
|
'--domain %(domain)s '
|
||||||
'--description %(description)s '
|
'--description %(description)s '
|
||||||
@ -83,11 +81,30 @@ class IdentityTests(base.TestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
# delete dummy project
|
try:
|
||||||
cls.openstack('project delete %s' % cls.project_name)
|
# delete dummy project
|
||||||
# disable and delete dummy domain
|
cls.openstack('--os-identity-api-version 3 '
|
||||||
cls.openstack('domain set --disable %s' % cls.domain_name)
|
'project delete %s' % cls.project_name)
|
||||||
cls.openstack('domain delete %s' % cls.domain_name)
|
# disable and delete dummy domain
|
||||||
|
cls.openstack('--os-identity-api-version 3 '
|
||||||
|
'domain set --disable %s' % cls.domain_name)
|
||||||
|
cls.openstack('--os-identity-api-version 3 '
|
||||||
|
'domain delete %s' % cls.domain_name)
|
||||||
|
finally:
|
||||||
|
super(IdentityTests, cls).tearDownClass()
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
super(IdentityTests, self).setUp()
|
||||||
|
# prepare v3 env
|
||||||
|
ver_fixture = fixtures.EnvironmentVariable(
|
||||||
|
'OS_IDENTITY_API_VERSION', '3')
|
||||||
|
self.useFixture(ver_fixture)
|
||||||
|
auth_url = os.environ.get('OS_AUTH_URL')
|
||||||
|
if auth_url:
|
||||||
|
auth_url_fixture = fixtures.EnvironmentVariable(
|
||||||
|
'OS_AUTH_URL', auth_url.replace('v2.0', 'v3')
|
||||||
|
)
|
||||||
|
self.useFixture(auth_url_fixture)
|
||||||
|
|
||||||
def _create_dummy_user(self, add_clean_up=True):
|
def _create_dummy_user(self, add_clean_up=True):
|
||||||
username = data_utils.rand_name('TestUser')
|
username = data_utils.rand_name('TestUser')
|
||||||
|
@ -11,9 +11,10 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
import fixtures
|
||||||
|
|
||||||
from openstackclient.tests.functional import base
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
@ -25,8 +26,9 @@ class ImageTests(base.TestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
os.environ['OS_IMAGE_API_VERSION'] = '1'
|
super(ImageTests, cls).setUpClass()
|
||||||
json_output = json.loads(cls.openstack(
|
json_output = json.loads(cls.openstack(
|
||||||
|
'--os-image-api-version 1 '
|
||||||
'image create -f json ' +
|
'image create -f json ' +
|
||||||
cls.NAME
|
cls.NAME
|
||||||
))
|
))
|
||||||
@ -35,10 +37,21 @@ class ImageTests(base.TestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
cls.openstack(
|
try:
|
||||||
'image delete ' +
|
cls.openstack(
|
||||||
cls.image_id
|
'--os-image-api-version 1 '
|
||||||
|
'image delete ' +
|
||||||
|
cls.image_id
|
||||||
|
)
|
||||||
|
finally:
|
||||||
|
super(ImageTests, cls).tearDownClass()
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
super(ImageTests, self).setUp()
|
||||||
|
ver_fixture = fixtures.EnvironmentVariable(
|
||||||
|
'OS_IMAGE_API_VERSION', '1'
|
||||||
)
|
)
|
||||||
|
self.useFixture(ver_fixture)
|
||||||
|
|
||||||
def test_image_list(self):
|
def test_image_list(self):
|
||||||
json_output = json.loads(self.openstack(
|
json_output = json.loads(self.openstack(
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
import fixtures
|
||||||
# from glanceclient import exc as image_exceptions
|
# from glanceclient import exc as image_exceptions
|
||||||
|
|
||||||
from openstackclient.tests.functional import base
|
from openstackclient.tests.functional import base
|
||||||
@ -27,8 +27,9 @@ class ImageTests(base.TestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
os.environ['OS_IMAGE_API_VERSION'] = '2'
|
super(ImageTests, cls).setUpClass()
|
||||||
json_output = json.loads(cls.openstack(
|
json_output = json.loads(cls.openstack(
|
||||||
|
'--os-image-api-version 2 '
|
||||||
'image create -f json ' +
|
'image create -f json ' +
|
||||||
cls.NAME
|
cls.NAME
|
||||||
))
|
))
|
||||||
@ -37,10 +38,21 @@ class ImageTests(base.TestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
cls.openstack(
|
try:
|
||||||
'image delete ' +
|
cls.openstack(
|
||||||
cls.image_id
|
'--os-image-api-version 2 '
|
||||||
|
'image delete ' +
|
||||||
|
cls.image_id
|
||||||
|
)
|
||||||
|
finally:
|
||||||
|
super(ImageTests, cls).tearDownClass()
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
super(ImageTests, self).setUp()
|
||||||
|
ver_fixture = fixtures.EnvironmentVariable(
|
||||||
|
'OS_IMAGE_API_VERSION', '2'
|
||||||
)
|
)
|
||||||
|
self.useFixture(ver_fixture)
|
||||||
|
|
||||||
def test_image_list(self):
|
def test_image_list(self):
|
||||||
json_output = json.loads(self.openstack(
|
json_output = json.loads(self.openstack(
|
||||||
|
@ -18,5 +18,5 @@ class NetworkTests(base.TestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
# super(NetworkTests, cls).setUp()
|
super(NetworkTests, cls).setUpClass()
|
||||||
cls.haz_network = base.is_service_enabled('network')
|
cls.haz_network = base.is_service_enabled('network')
|
||||||
|
@ -88,19 +88,22 @@ class FloatingIpTests(common.NetworkTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
if cls.haz_network:
|
try:
|
||||||
del_output = cls.openstack(
|
if cls.haz_network:
|
||||||
'subnet delete ' +
|
del_output = cls.openstack(
|
||||||
cls.EXTERNAL_SUBNET_NAME + ' ' +
|
'subnet delete ' +
|
||||||
cls.PRIVATE_SUBNET_NAME
|
cls.EXTERNAL_SUBNET_NAME + ' ' +
|
||||||
)
|
cls.PRIVATE_SUBNET_NAME
|
||||||
cls.assertOutput('', del_output)
|
)
|
||||||
del_output = cls.openstack(
|
cls.assertOutput('', del_output)
|
||||||
'network delete ' +
|
del_output = cls.openstack(
|
||||||
cls.EXTERNAL_NETWORK_NAME + ' ' +
|
'network delete ' +
|
||||||
cls.PRIVATE_NETWORK_NAME
|
cls.EXTERNAL_NETWORK_NAME + ' ' +
|
||||||
)
|
cls.PRIVATE_NETWORK_NAME
|
||||||
cls.assertOutput('', del_output)
|
)
|
||||||
|
cls.assertOutput('', del_output)
|
||||||
|
finally:
|
||||||
|
super(FloatingIpTests, cls).tearDownClass()
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(FloatingIpTests, self).setUp()
|
super(FloatingIpTests, self).setUp()
|
||||||
|
@ -41,17 +41,20 @@ class IPAvailabilityTests(common.NetworkTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
if cls.haz_network:
|
try:
|
||||||
raw_subnet = cls.openstack(
|
if cls.haz_network:
|
||||||
'subnet delete ' +
|
raw_subnet = cls.openstack(
|
||||||
cls.NAME
|
'subnet delete ' +
|
||||||
)
|
cls.NAME
|
||||||
raw_network = cls.openstack(
|
)
|
||||||
'network delete ' +
|
raw_network = cls.openstack(
|
||||||
cls.NETWORK_NAME
|
'network delete ' +
|
||||||
)
|
cls.NETWORK_NAME
|
||||||
cls.assertOutput('', raw_subnet)
|
)
|
||||||
cls.assertOutput('', raw_network)
|
cls.assertOutput('', raw_subnet)
|
||||||
|
cls.assertOutput('', raw_network)
|
||||||
|
finally:
|
||||||
|
super(IPAvailabilityTests, cls).tearDownClass()
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(IPAvailabilityTests, self).setUp()
|
super(IPAvailabilityTests, self).setUp()
|
||||||
|
@ -361,7 +361,7 @@ class NetworkTests(common.NetworkTests):
|
|||||||
self.assertNotIn(name2, col_name)
|
self.assertNotIn(name2, col_name)
|
||||||
|
|
||||||
def test_network_dhcp_agent(self):
|
def test_network_dhcp_agent(self):
|
||||||
if self.haz_network:
|
if not self.haz_network:
|
||||||
self.skipTest("No Network service present")
|
self.skipTest("No Network service present")
|
||||||
|
|
||||||
name1 = uuid.uuid4().hex
|
name1 = uuid.uuid4().hex
|
||||||
@ -408,7 +408,7 @@ class NetworkTests(common.NetworkTests):
|
|||||||
|
|
||||||
def test_network_set(self):
|
def test_network_set(self):
|
||||||
"""Tests create options, set, show, delete"""
|
"""Tests create options, set, show, delete"""
|
||||||
if self.haz_network:
|
if not self.haz_network:
|
||||||
self.skipTest("No Network service present")
|
self.skipTest("No Network service present")
|
||||||
|
|
||||||
name = uuid.uuid4().hex
|
name = uuid.uuid4().hex
|
||||||
|
@ -39,13 +39,15 @@ class TestMeterRule(common.NetworkTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
common.NetworkTests.tearDownClass()
|
try:
|
||||||
if cls.haz_network:
|
if cls.haz_network:
|
||||||
raw_output = cls.openstack(
|
raw_output = cls.openstack(
|
||||||
'network meter delete ' +
|
'network meter delete ' +
|
||||||
cls.METER_ID
|
cls.METER_ID
|
||||||
)
|
)
|
||||||
cls.assertOutput('', raw_output)
|
cls.assertOutput('', raw_output)
|
||||||
|
finally:
|
||||||
|
common.NetworkTests.tearDownClass()
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestMeterRule, self).setUp()
|
super(TestMeterRule, self).setUp()
|
||||||
|
@ -39,12 +39,15 @@ class NetworkQosPolicyTests(common.NetworkTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
if cls.haz_network:
|
try:
|
||||||
raw_output = cls.openstack(
|
if cls.haz_network:
|
||||||
'network qos policy delete ' +
|
raw_output = cls.openstack(
|
||||||
cls.NAME
|
'network qos policy delete ' +
|
||||||
)
|
cls.NAME
|
||||||
cls.assertOutput('', raw_output)
|
)
|
||||||
|
cls.assertOutput('', raw_output)
|
||||||
|
finally:
|
||||||
|
super(NetworkQosPolicyTests, cls).tearDownClass()
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(NetworkQosPolicyTests, self).setUp()
|
super(NetworkQosPolicyTests, self).setUp()
|
||||||
|
@ -51,17 +51,20 @@ class NetworkQosRuleTestsMinimumBandwidth(common.NetworkTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
if cls.haz_network:
|
try:
|
||||||
raw_output = cls.openstack(
|
if cls.haz_network:
|
||||||
'network qos rule delete ' +
|
raw_output = cls.openstack(
|
||||||
cls.QOS_POLICY_NAME + ' ' +
|
'network qos rule delete ' +
|
||||||
cls.RULE_ID
|
cls.QOS_POLICY_NAME + ' ' +
|
||||||
)
|
cls.RULE_ID
|
||||||
cls.openstack(
|
)
|
||||||
'network qos policy delete ' +
|
cls.openstack(
|
||||||
cls.QOS_POLICY_NAME
|
'network qos policy delete ' +
|
||||||
)
|
cls.QOS_POLICY_NAME
|
||||||
cls.assertOutput('', raw_output)
|
)
|
||||||
|
cls.assertOutput('', raw_output)
|
||||||
|
finally:
|
||||||
|
super(NetworkQosRuleTestsMinimumBandwidth, cls).tearDownClass()
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(NetworkQosRuleTestsMinimumBandwidth, self).setUp()
|
super(NetworkQosRuleTestsMinimumBandwidth, self).setUp()
|
||||||
@ -123,14 +126,18 @@ class NetworkQosRuleTestsDSCPMarking(common.NetworkTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
if cls.haz_network:
|
try:
|
||||||
raw_output = cls.openstack(
|
if cls.haz_network:
|
||||||
'network qos rule delete ' +
|
raw_output = cls.openstack(
|
||||||
cls.QOS_POLICY_NAME + ' ' +
|
'network qos rule delete ' +
|
||||||
cls.RULE_ID
|
cls.QOS_POLICY_NAME + ' ' +
|
||||||
)
|
cls.RULE_ID
|
||||||
cls.openstack('network qos policy delete ' + cls.QOS_POLICY_NAME)
|
)
|
||||||
cls.assertOutput('', raw_output)
|
cls.openstack(
|
||||||
|
'network qos policy delete ' + cls.QOS_POLICY_NAME)
|
||||||
|
cls.assertOutput('', raw_output)
|
||||||
|
finally:
|
||||||
|
super(NetworkQosRuleTestsDSCPMarking, cls).tearDownClass()
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(NetworkQosRuleTestsDSCPMarking, self).setUp()
|
super(NetworkQosRuleTestsDSCPMarking, self).setUp()
|
||||||
@ -198,14 +205,18 @@ class NetworkQosRuleTestsBandwidthLimit(common.NetworkTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
if cls.haz_network:
|
try:
|
||||||
raw_output = cls.openstack(
|
if cls.haz_network:
|
||||||
'network qos rule delete ' +
|
raw_output = cls.openstack(
|
||||||
cls.QOS_POLICY_NAME + ' ' +
|
'network qos rule delete ' +
|
||||||
cls.RULE_ID
|
cls.QOS_POLICY_NAME + ' ' +
|
||||||
)
|
cls.RULE_ID
|
||||||
cls.openstack('network qos policy delete ' + cls.QOS_POLICY_NAME)
|
)
|
||||||
cls.assertOutput('', raw_output)
|
cls.openstack(
|
||||||
|
'network qos policy delete ' + cls.QOS_POLICY_NAME)
|
||||||
|
cls.assertOutput('', raw_output)
|
||||||
|
finally:
|
||||||
|
super(NetworkQosRuleTestsBandwidthLimit, cls).tearDownClass()
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(NetworkQosRuleTestsBandwidthLimit, self).setUp()
|
super(NetworkQosRuleTestsBandwidthLimit, self).setUp()
|
||||||
|
@ -47,15 +47,18 @@ class NetworkRBACTests(common.NetworkTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
if cls.haz_network:
|
try:
|
||||||
raw_output_rbac = cls.openstack(
|
if cls.haz_network:
|
||||||
'network rbac delete ' + cls.ID
|
raw_output_rbac = cls.openstack(
|
||||||
)
|
'network rbac delete ' + cls.ID
|
||||||
raw_output_network = cls.openstack(
|
)
|
||||||
'network delete ' + cls.OBJECT_ID
|
raw_output_network = cls.openstack(
|
||||||
)
|
'network delete ' + cls.OBJECT_ID
|
||||||
cls.assertOutput('', raw_output_rbac)
|
)
|
||||||
cls.assertOutput('', raw_output_network)
|
cls.assertOutput('', raw_output_rbac)
|
||||||
|
cls.assertOutput('', raw_output_network)
|
||||||
|
finally:
|
||||||
|
super(NetworkRBACTests, cls).tearDownClass()
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(NetworkRBACTests, self).setUp()
|
super(NetworkRBACTests, self).setUp()
|
||||||
|
@ -55,11 +55,14 @@ class NetworkSegmentTests(common.NetworkTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
if cls.haz_network:
|
try:
|
||||||
raw_output = cls.openstack(
|
if cls.haz_network:
|
||||||
'network delete ' + cls.NETWORK_NAME
|
raw_output = cls.openstack(
|
||||||
)
|
'network delete ' + cls.NETWORK_NAME
|
||||||
cls.assertOutput('', raw_output)
|
)
|
||||||
|
cls.assertOutput('', raw_output)
|
||||||
|
finally:
|
||||||
|
super(NetworkSegmentTests, cls).tearDownClass()
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(NetworkSegmentTests, self).setUp()
|
super(NetworkSegmentTests, self).setUp()
|
||||||
|
@ -33,11 +33,14 @@ class PortTests(common.NetworkTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
if cls.haz_network:
|
try:
|
||||||
raw_output = cls.openstack(
|
if cls.haz_network:
|
||||||
'network delete ' + cls.NETWORK_NAME
|
raw_output = cls.openstack(
|
||||||
)
|
'network delete ' + cls.NETWORK_NAME
|
||||||
cls.assertOutput('', raw_output)
|
)
|
||||||
|
cls.assertOutput('', raw_output)
|
||||||
|
finally:
|
||||||
|
super(PortTests, cls).tearDownClass()
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(PortTests, self).setUp()
|
super(PortTests, self).setUp()
|
||||||
|
@ -38,20 +38,23 @@ class SecurityGroupTests(common.NetworkTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
if cls.haz_network:
|
try:
|
||||||
# Rename test
|
if cls.haz_network:
|
||||||
raw_output = cls.openstack(
|
# Rename test
|
||||||
'security group set --name ' +
|
raw_output = cls.openstack(
|
||||||
cls.OTHER_NAME + ' ' +
|
'security group set --name ' +
|
||||||
cls.NAME
|
cls.OTHER_NAME + ' ' +
|
||||||
)
|
cls.NAME
|
||||||
cls.assertOutput('', raw_output)
|
)
|
||||||
# Delete test
|
cls.assertOutput('', raw_output)
|
||||||
raw_output = cls.openstack(
|
# Delete test
|
||||||
'security group delete ' +
|
raw_output = cls.openstack(
|
||||||
cls.OTHER_NAME
|
'security group delete ' +
|
||||||
)
|
cls.OTHER_NAME
|
||||||
cls.assertOutput('', raw_output)
|
)
|
||||||
|
cls.assertOutput('', raw_output)
|
||||||
|
finally:
|
||||||
|
super(SecurityGroupTests, cls).tearDownClass()
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(SecurityGroupTests, self).setUp()
|
super(SecurityGroupTests, self).setUp()
|
||||||
|
@ -51,18 +51,20 @@ class SecurityGroupRuleTests(common.NetworkTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
if cls.haz_network:
|
try:
|
||||||
raw_output = cls.openstack(
|
if cls.haz_network:
|
||||||
'security group rule delete ' +
|
raw_output = cls.openstack(
|
||||||
cls.SECURITY_GROUP_RULE_ID
|
'security group rule delete ' +
|
||||||
)
|
cls.SECURITY_GROUP_RULE_ID
|
||||||
cls.assertOutput('', raw_output)
|
)
|
||||||
|
cls.assertOutput('', raw_output)
|
||||||
raw_output = cls.openstack(
|
raw_output = cls.openstack(
|
||||||
'security group delete ' +
|
'security group delete ' +
|
||||||
cls.SECURITY_GROUP_NAME
|
cls.SECURITY_GROUP_NAME
|
||||||
)
|
)
|
||||||
cls.assertOutput('', raw_output)
|
cls.assertOutput('', raw_output)
|
||||||
|
finally:
|
||||||
|
super(SecurityGroupRuleTests, cls).tearDownClass()
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(SecurityGroupRuleTests, self).setUp()
|
super(SecurityGroupRuleTests, self).setUp()
|
||||||
|
@ -36,12 +36,15 @@ class SubnetTests(common.NetworkTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
if cls.haz_network:
|
try:
|
||||||
raw_output = cls.openstack(
|
if cls.haz_network:
|
||||||
'network delete ' +
|
raw_output = cls.openstack(
|
||||||
cls.NETWORK_NAME
|
'network delete ' +
|
||||||
)
|
cls.NETWORK_NAME
|
||||||
cls.assertOutput('', raw_output)
|
)
|
||||||
|
cls.assertOutput('', raw_output)
|
||||||
|
finally:
|
||||||
|
super(SubnetTests, cls).tearDownClass()
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(SubnetTests, self).setUp()
|
super(SubnetTests, self).setUp()
|
||||||
|
@ -21,14 +21,18 @@ class ContainerTests(base.TestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
super(ContainerTests, cls).setUpClass()
|
||||||
opts = cls.get_opts(['container'])
|
opts = cls.get_opts(['container'])
|
||||||
raw_output = cls.openstack('container create ' + cls.NAME + opts)
|
raw_output = cls.openstack('container create ' + cls.NAME + opts)
|
||||||
cls.assertOutput(cls.NAME + '\n', raw_output)
|
cls.assertOutput(cls.NAME + '\n', raw_output)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
raw_output = cls.openstack('container delete ' + cls.NAME)
|
try:
|
||||||
cls.assertOutput('', raw_output)
|
raw_output = cls.openstack('container delete ' + cls.NAME)
|
||||||
|
cls.assertOutput('', raw_output)
|
||||||
|
finally:
|
||||||
|
super(ContainerTests, cls).tearDownClass()
|
||||||
|
|
||||||
def test_container_list(self):
|
def test_container_list(self):
|
||||||
opts = self.get_opts(['Name'])
|
opts = self.get_opts(['Name'])
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import os
|
import fixtures
|
||||||
|
|
||||||
from openstackclient.tests.functional.volume import base
|
from openstackclient.tests.functional.volume import base
|
||||||
|
|
||||||
@ -18,6 +18,9 @@ from openstackclient.tests.functional.volume import base
|
|||||||
class BaseVolumeTests(base.BaseVolumeTests):
|
class BaseVolumeTests(base.BaseVolumeTests):
|
||||||
"""Base class for Volume functional tests. """
|
"""Base class for Volume functional tests. """
|
||||||
|
|
||||||
@classmethod
|
def setUp(self):
|
||||||
def setUpClass(cls):
|
super(BaseVolumeTests, self).setUp()
|
||||||
os.environ['OS_VOLUME_API_VERSION'] = '1'
|
ver_fixture = fixtures.EnvironmentVariable(
|
||||||
|
'OS_VOLUME_API_VERSION', '1'
|
||||||
|
)
|
||||||
|
self.useFixture(ver_fixture)
|
||||||
|
@ -35,9 +35,12 @@ class VolumeSnapshotTests(common.BaseVolumeTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
cls.wait_for_status('volume', cls.VOLLY, 'available')
|
try:
|
||||||
raw_output = cls.openstack('volume delete --force ' + cls.VOLLY)
|
cls.wait_for_status('volume', cls.VOLLY, 'available')
|
||||||
cls.assertOutput('', raw_output)
|
raw_output = cls.openstack('volume delete --force ' + cls.VOLLY)
|
||||||
|
cls.assertOutput('', raw_output)
|
||||||
|
finally:
|
||||||
|
super(VolumeSnapshotTests, cls).tearDownClass()
|
||||||
|
|
||||||
def test_volume_snapshot__delete(self):
|
def test_volume_snapshot__delete(self):
|
||||||
"""Test create, delete multiple"""
|
"""Test create, delete multiple"""
|
||||||
|
@ -37,12 +37,15 @@ class TransferRequestTests(common.BaseVolumeTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
raw_output_transfer = cls.openstack(
|
try:
|
||||||
'volume transfer request delete ' + cls.NAME)
|
raw_output_transfer = cls.openstack(
|
||||||
raw_output_volume = cls.openstack(
|
'volume transfer request delete ' + cls.NAME)
|
||||||
'volume delete ' + cls.VOLUME_NAME)
|
raw_output_volume = cls.openstack(
|
||||||
cls.assertOutput('', raw_output_transfer)
|
'volume delete ' + cls.VOLUME_NAME)
|
||||||
cls.assertOutput('', raw_output_volume)
|
cls.assertOutput('', raw_output_transfer)
|
||||||
|
cls.assertOutput('', raw_output_volume)
|
||||||
|
finally:
|
||||||
|
super(TransferRequestTests, cls).tearDownClass()
|
||||||
|
|
||||||
def test_volume_transfer_request_accept(self):
|
def test_volume_transfer_request_accept(self):
|
||||||
volume_name = uuid.uuid4().hex
|
volume_name = uuid.uuid4().hex
|
||||||
|
@ -31,8 +31,11 @@ class VolumeTypeTests(common.BaseVolumeTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
raw_output = cls.openstack('volume type delete ' + cls.NAME)
|
try:
|
||||||
cls.assertOutput('', raw_output)
|
raw_output = cls.openstack('volume type delete ' + cls.NAME)
|
||||||
|
cls.assertOutput('', raw_output)
|
||||||
|
finally:
|
||||||
|
super(VolumeTypeTests, cls).tearDownClass()
|
||||||
|
|
||||||
def test_volume_type_list(self):
|
def test_volume_type_list(self):
|
||||||
cmd_output = json.loads(self.openstack('volume type list -f json'))
|
cmd_output = json.loads(self.openstack('volume type list -f json'))
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import os
|
import fixtures
|
||||||
|
|
||||||
from openstackclient.tests.functional.volume import base
|
from openstackclient.tests.functional.volume import base
|
||||||
|
|
||||||
@ -18,6 +18,9 @@ from openstackclient.tests.functional.volume import base
|
|||||||
class BaseVolumeTests(base.BaseVolumeTests):
|
class BaseVolumeTests(base.BaseVolumeTests):
|
||||||
"""Base class for Volume functional tests. """
|
"""Base class for Volume functional tests. """
|
||||||
|
|
||||||
@classmethod
|
def setUp(self):
|
||||||
def setUpClass(cls):
|
super(BaseVolumeTests, self).setUp()
|
||||||
os.environ['OS_VOLUME_API_VERSION'] = '2'
|
ver_fixture = fixtures.EnvironmentVariable(
|
||||||
|
'OS_VOLUME_API_VERSION', '2'
|
||||||
|
)
|
||||||
|
self.useFixture(ver_fixture)
|
||||||
|
@ -35,10 +35,13 @@ class VolumeSnapshotTests(common.BaseVolumeTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
cls.wait_for_status('volume', cls.VOLLY, 'available')
|
try:
|
||||||
raw_output = cls.openstack(
|
cls.wait_for_status('volume', cls.VOLLY, 'available')
|
||||||
'volume delete --force ' + cls.VOLLY)
|
raw_output = cls.openstack(
|
||||||
cls.assertOutput('', raw_output)
|
'volume delete --force ' + cls.VOLLY)
|
||||||
|
cls.assertOutput('', raw_output)
|
||||||
|
finally:
|
||||||
|
super(VolumeSnapshotTests, cls).tearDownClass()
|
||||||
|
|
||||||
def test_volume_snapshot__delete(self):
|
def test_volume_snapshot__delete(self):
|
||||||
"""Test create, delete multiple"""
|
"""Test create, delete multiple"""
|
||||||
|
@ -38,12 +38,15 @@ class TransferRequestTests(common.BaseVolumeTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
raw_output_transfer = cls.openstack(
|
try:
|
||||||
'volume transfer request delete ' + cls.NAME)
|
raw_output_transfer = cls.openstack(
|
||||||
raw_output_volume = cls.openstack(
|
'volume transfer request delete ' + cls.NAME)
|
||||||
'volume delete ' + cls.VOLUME_NAME)
|
raw_output_volume = cls.openstack(
|
||||||
cls.assertOutput('', raw_output_transfer)
|
'volume delete ' + cls.VOLUME_NAME)
|
||||||
cls.assertOutput('', raw_output_volume)
|
cls.assertOutput('', raw_output_transfer)
|
||||||
|
cls.assertOutput('', raw_output_volume)
|
||||||
|
finally:
|
||||||
|
super(TransferRequestTests, cls).tearDownClass()
|
||||||
|
|
||||||
def test_volume_transfer_request_accept(self):
|
def test_volume_transfer_request_accept(self):
|
||||||
volume_name = uuid.uuid4().hex
|
volume_name = uuid.uuid4().hex
|
||||||
|
@ -31,8 +31,11 @@ class VolumeTypeTests(common.BaseVolumeTests):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
raw_output = cls.openstack('volume type delete ' + cls.NAME)
|
try:
|
||||||
cls.assertOutput('', raw_output)
|
raw_output = cls.openstack('volume type delete ' + cls.NAME)
|
||||||
|
cls.assertOutput('', raw_output)
|
||||||
|
finally:
|
||||||
|
super(VolumeTypeTests, cls).tearDownClass()
|
||||||
|
|
||||||
def test_volume_type_list(self):
|
def test_volume_type_list(self):
|
||||||
cmd_output = json.loads(self.openstack('volume type list -f json'))
|
cmd_output = json.loads(self.openstack('volume type list -f json'))
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import os
|
import fixtures
|
||||||
|
|
||||||
from openstackclient.tests.functional.volume import base
|
from openstackclient.tests.functional.volume import base
|
||||||
|
|
||||||
@ -18,6 +18,9 @@ from openstackclient.tests.functional.volume import base
|
|||||||
class BaseVolumeTests(base.BaseVolumeTests):
|
class BaseVolumeTests(base.BaseVolumeTests):
|
||||||
"""Base class for Volume functional tests. """
|
"""Base class for Volume functional tests. """
|
||||||
|
|
||||||
@classmethod
|
def setUp(self):
|
||||||
def setUpClass(cls):
|
super(BaseVolumeTests, self).setUp()
|
||||||
os.environ['OS_VOLUME_API_VERSION'] = '3'
|
ver_fixture = fixtures.EnvironmentVariable(
|
||||||
|
'OS_VOLUME_API_VERSION', '3'
|
||||||
|
)
|
||||||
|
self.useFixture(ver_fixture)
|
||||||
|
@ -10,15 +10,9 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
from openstackclient.tests.functional.volume.v2 import test_qos as v2
|
from openstackclient.tests.functional.volume.v2 import test_qos as v2
|
||||||
|
from openstackclient.tests.functional.volume.v3 import common
|
||||||
|
|
||||||
|
|
||||||
class QosTests(v2.QosTests):
|
class QosTests(common.BaseVolumeTests, v2.QosTests):
|
||||||
"""Functional tests for volume qos. """
|
"""Functional tests for volume qos. """
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(QosTests, cls).setUpClass()
|
|
||||||
os.environ['OS_VOLUME_API_VERSION'] = '3'
|
|
||||||
|
@ -11,13 +11,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstackclient.tests.functional.volume.v2 import test_snapshot as v2
|
from openstackclient.tests.functional.volume.v2 import test_snapshot as v2
|
||||||
import os
|
from openstackclient.tests.functional.volume.v3 import common
|
||||||
|
|
||||||
|
|
||||||
class VolumeSnapshotTests(v2.VolumeSnapshotTests):
|
class VolumeSnapshotTests(common.BaseVolumeTests, v2.VolumeSnapshotTests):
|
||||||
"""Functional tests for volume snapshot. """
|
"""Functional tests for volume snapshot. """
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(VolumeSnapshotTests, cls).setUpClass()
|
|
||||||
os.environ['OS_VOLUME_API_VERSION'] = '3'
|
|
||||||
|
@ -12,13 +12,8 @@
|
|||||||
|
|
||||||
from openstackclient.tests.functional.volume.v2 import test_transfer_request \
|
from openstackclient.tests.functional.volume.v2 import test_transfer_request \
|
||||||
as v2
|
as v2
|
||||||
import os
|
from openstackclient.tests.functional.volume.v3 import common
|
||||||
|
|
||||||
|
|
||||||
class TransferRequestTests(v2.TransferRequestTests):
|
class TransferRequestTests(common.BaseVolumeTests, v2.TransferRequestTests):
|
||||||
"""Functional tests for transfer request. """
|
"""Functional tests for transfer request. """
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(TransferRequestTests, cls).setUpClass()
|
|
||||||
os.environ['OS_VOLUME_API_VERSION'] = '3'
|
|
||||||
|
@ -11,13 +11,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstackclient.tests.functional.volume.v2 import test_volume as v2
|
from openstackclient.tests.functional.volume.v2 import test_volume as v2
|
||||||
import os
|
from openstackclient.tests.functional.volume.v3 import common
|
||||||
|
|
||||||
|
|
||||||
class VolumeTests(v2.VolumeTests):
|
class VolumeTests(common.BaseVolumeTests, v2.VolumeTests):
|
||||||
"""Functional tests for volume. """
|
"""Functional tests for volume. """
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(VolumeTests, cls).setUpClass()
|
|
||||||
os.environ['OS_VOLUME_API_VERSION'] = '3'
|
|
||||||
|
@ -11,13 +11,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstackclient.tests.functional.volume.v2 import test_volume_type as v2
|
from openstackclient.tests.functional.volume.v2 import test_volume_type as v2
|
||||||
import os
|
from openstackclient.tests.functional.volume.v3 import common
|
||||||
|
|
||||||
|
|
||||||
class VolumeTypeTests(v2.VolumeTypeTests):
|
class VolumeTypeTests(common.BaseVolumeTests, v2.VolumeTypeTests):
|
||||||
"""Functional tests for volume type. """
|
"""Functional tests for volume type. """
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(VolumeTypeTests, cls).setUpClass()
|
|
||||||
os.environ['OS_VOLUME_API_VERSION'] = '3'
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user