Tempest: Add l3-ha extension requirement for HA tests
Change-Id: I3b6cc4888875000d6400758a15ea20ad59d39240
Closes-Bug: #1768209
diff --git a/neutron_tempest_plugin/api/admin/test_routers_dvr.py b/neutron_tempest_plugin/api/admin/test_routers_dvr.py
index 2313d1b..644bc38 100644
--- a/neutron_tempest_plugin/api/admin/test_routers_dvr.py
+++ b/neutron_tempest_plugin/api/admin/test_routers_dvr.py
@@ -19,7 +19,7 @@
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 @@
# 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 @@
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 @@
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):
"""
diff --git a/neutron_tempest_plugin/api/test_routers.py b/neutron_tempest_plugin/api/test_routers.py
index bc657e0..e1b2eb1 100644
--- a/neutron_tempest_plugin/api/test_routers.py
+++ b/neutron_tempest_plugin/api/test_routers.py
@@ -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
@@ -241,6 +242,11 @@
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,