Merge "Tempest: Add l3-ha extension requirement for HA tests"
This commit is contained in:
commit
de8ddb3e59
@ -19,7 +19,7 @@ from tempest.lib import decorators
|
||||
from neutron_tempest_plugin.api import base_routers as base
|
||||
|
||||
|
||||
class RoutersTestDVR(base.BaseRouterTest):
|
||||
class RoutersTestDVRBase(base.BaseRouterTest):
|
||||
|
||||
required_extensions = ['router', 'dvr']
|
||||
|
||||
@ -31,7 +31,7 @@ class RoutersTestDVR(base.BaseRouterTest):
|
||||
# admin credentials to create router with distributed=True attribute
|
||||
# and checking for BadRequest exception and that the resulting router
|
||||
# has a distributed attribute.
|
||||
super(RoutersTestDVR, cls).resource_setup()
|
||||
super(RoutersTestDVRBase, cls).resource_setup()
|
||||
name = data_utils.rand_name('pretest-check')
|
||||
router = cls.admin_client.create_router(name)
|
||||
if 'distributed' not in router['router']:
|
||||
@ -39,6 +39,9 @@ class RoutersTestDVR(base.BaseRouterTest):
|
||||
raise cls.skipException(msg)
|
||||
cls.admin_client.delete_router(router['router']['id'])
|
||||
|
||||
|
||||
class RoutersTestDVR(RoutersTestDVRBase):
|
||||
|
||||
@decorators.idempotent_id('08a2a0a8-f1e4-4b34-8e30-e522e836c44e')
|
||||
def test_distributed_router_creation(self):
|
||||
"""
|
||||
@ -74,6 +77,11 @@ class RoutersTestDVR(base.BaseRouterTest):
|
||||
router['router']['id'])
|
||||
self.assertFalse(router['router']['distributed'])
|
||||
|
||||
|
||||
class RouterTestCentralizedToDVR(RoutersTestDVRBase):
|
||||
|
||||
required_extensions = ['l3-ha']
|
||||
|
||||
@decorators.idempotent_id('acd43596-c1fb-439d-ada8-31ad48ae3c2e')
|
||||
def test_centralized_router_update_to_dvr(self):
|
||||
"""
|
||||
|
@ -14,6 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
import netaddr
|
||||
|
||||
from tempest.common import utils as tutils
|
||||
from tempest.lib.common.utils import data_utils
|
||||
from tempest.lib import decorators
|
||||
@ -244,6 +245,11 @@ class DvrRoutersTest(base_routers.BaseRouterTest):
|
||||
self.admin_client)
|
||||
self.assertTrue(create_body['router']['distributed'])
|
||||
|
||||
|
||||
class DvrRoutersTestToCentralized(base_routers.BaseRouterTest):
|
||||
|
||||
required_extensions = ['dvr', 'l3-ha']
|
||||
|
||||
@decorators.idempotent_id('644d7a4a-01a1-4b68-bb8d-0c0042cb1729')
|
||||
def test_convert_centralized_router(self):
|
||||
router_args = {'tenant_id': self.client.tenant_id,
|
||||
|
Loading…
Reference in New Issue
Block a user