summaryrefslogtreecommitdiff
path: root/tempest/api/network/test_routers_negative.py
diff options
context:
space:
mode:
Diffstat (limited to 'tempest/api/network/test_routers_negative.py')
-rw-r--r--tempest/api/network/test_routers_negative.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tempest/api/network/test_routers_negative.py b/tempest/api/network/test_routers_negative.py
index ae17222ae..4149be3b5 100644
--- a/tempest/api/network/test_routers_negative.py
+++ b/tempest/api/network/test_routers_negative.py
@@ -114,3 +114,28 @@ class RoutersNegativeTest(base.BaseRouterTest):
class RoutersNegativeIpV6Test(RoutersNegativeTest):
_ip_version = 6
+
+
+class DvrRoutersNegativeTest(base.BaseRouterTest):
+
+ @classmethod
+ def skip_checks(cls):
+ super(DvrRoutersNegativeTest, cls).skip_checks()
+ if not test.is_extension_enabled('dvr', 'network'):
+ msg = "DVR extension not enabled."
+ raise cls.skipException(msg)
+
+ @classmethod
+ def resource_setup(cls):
+ super(DvrRoutersNegativeTest, cls).resource_setup()
+ cls.router = cls.create_router(data_utils.rand_name('router'))
+ cls.network = cls.create_network()
+ cls.subnet = cls.create_subnet(cls.network)
+
+ @test.attr(type=['negative', 'smoke'])
+ @test.idempotent_id('4990b055-8fc7-48ab-bba7-aa28beaad0b9')
+ def test_router_create_tenant_distributed_returns_forbidden(self):
+ self.assertRaises(lib_exc.Forbidden,
+ self.create_router,
+ data_utils.rand_name('router'),
+ distributed=True)