Add tempest test for l3-ha extension
Add missing l3-ha extension under neutron tempest tests.
Change-Id: Ia608d3f5d63a88eefa4e61da6df2f3656c8446a0
Closes-Bug: #1684065
diff --git a/neutron/tests/tempest/api/test_routers.py b/neutron/tests/tempest/api/test_routers.py
index 7a1e458..85bfe82 100644
--- a/neutron/tests/tempest/api/test_routers.py
+++ b/neutron/tests/tempest/api/test_routers.py
@@ -259,6 +259,26 @@
self.assertNotIn('distributed', show_body['router'])
+class HaRoutersTest(base_routers.BaseRouterTest):
+
+ @classmethod
+ @test.requires_ext(extension="l3-ha", service="network")
+ def skip_checks(cls):
+ super(HaRoutersTest, cls).skip_checks()
+
+ @decorators.idempotent_id('77db8eae-3aa3-4e61-bf2a-e739ce042e53')
+ def test_convert_legacy_router(self):
+ router = self._create_router(data_utils.rand_name('router'))
+ self.assertNotIn('ha', router)
+ update_body = self.admin_client.update_router(router['id'],
+ ha=True)
+ self.assertTrue(update_body['router']['ha'])
+ show_body = self.admin_client.show_router(router['id'])
+ self.assertTrue(show_body['router']['ha'])
+ show_body = self.client.show_router(router['id'])
+ self.assertNotIn('ha', show_body['router'])
+
+
class RoutersSearchCriteriaTest(base.BaseSearchCriteriaTest):
resource = 'router'