Set max_microversion 2.35 for nova security group tests

The compute os-security-groups API is deprecated from the
Microversion 2.36, so we should set max_microversion = '2.35'
for compute security group tests.

Implements blueprint: clear-deprecated-api

Change-Id: I2084ddcac0f8b4b9f81e5263ac4058939418626d
This commit is contained in:
zhufl 2018-03-28 09:55:04 +08:00
parent 4bcf7e1002
commit 95d7525ca1
4 changed files with 13 additions and 3 deletions

View File

@ -22,12 +22,12 @@ from tempest.lib import exceptions as lib_exc
CONF = config.CONF
class QuotasAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
class QuotasAdminNegativeTestBase(base.BaseV2ComputeAdminTest):
force_tenant_isolation = True
@classmethod
def setup_clients(cls):
super(QuotasAdminNegativeTestJSON, cls).setup_clients()
super(QuotasAdminNegativeTestBase, cls).setup_clients()
cls.client = cls.os_primary.quotas_client
cls.adm_client = cls.os_admin.quotas_client
cls.sg_client = cls.security_groups_client
@ -35,7 +35,7 @@ class QuotasAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def resource_setup(cls):
super(QuotasAdminNegativeTestJSON, cls).resource_setup()
super(QuotasAdminNegativeTestBase, cls).resource_setup()
# NOTE(afazekas): these test cases should always create and use a new
# tenant most of them should be skipped if we can't do that
cls.demo_tenant_id = cls.client.tenant_id
@ -51,6 +51,9 @@ class QuotasAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
self.addCleanup(self.adm_client.update_quota_set, self.demo_tenant_id,
**{quota_item: default_quota_value})
class QuotasAdminNegativeTest(QuotasAdminNegativeTestBase):
@decorators.attr(type=['negative'])
@decorators.idempotent_id('733abfe8-166e-47bb-8363-23dbd7ff3476')
def test_update_quota_normal_user(self):
@ -85,6 +88,10 @@ class QuotasAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
self.assertRaises((lib_exc.Forbidden, lib_exc.OverLimit),
self.create_test_server)
class QuotasSecurityGroupAdminNegativeTest(QuotasAdminNegativeTestBase):
max_microversion = '2.35'
@decorators.skip_because(bug="1186354",
condition=CONF.service_available.neutron)
@decorators.attr(type=['negative'])

View File

@ -23,6 +23,7 @@ CONF = config.CONF
class SecurityGroupDefaultRulesTest(base.BaseV2ComputeAdminTest):
max_microversion = '2.35'
@classmethod
# TODO(GMann): Once Bug# 1311500 is fixed, these test can run

View File

@ -20,6 +20,7 @@ from tempest.lib import decorators
class SecurityGroupsTestAdminJSON(base.BaseV2ComputeAdminTest):
max_microversion = '2.35'
@classmethod
def setup_clients(cls):

View File

@ -22,6 +22,7 @@ CONF = config.CONF
class BaseSecurityGroupsTest(base.BaseV2ComputeTest):
max_microversion = '2.35'
@classmethod
def skip_checks(cls):