Browse Source

Update unit tests

Add test plugin class inheritance from SecurityGroupServerRpcMixin

Change-Id: I2b39dd0e53a1f1a1ac7b80410ff530714042bb40
Harkirat Singh 4 years ago
parent
commit
ece20aa490
1 changed files with 8 additions and 2 deletions
  1. 8
    2
      networking_brocade/vyatta/tests/test_vrouter_neutron_plugin.py

+ 8
- 2
networking_brocade/vyatta/tests/test_vrouter_neutron_plugin.py View File

@@ -20,6 +20,7 @@ from neutron import context
20 20
 from neutron.db import db_base_plugin_v2
21 21
 from neutron.db import external_net_db
22 22
 from neutron.db import models_v2
23
+from neutron.db import securitygroups_rpc_base as sg_db_rpc
23 24
 from neutron.extensions import l3
24 25
 from neutron.openstack.common import uuidutils
25 26
 from neutron.tests.unit.db import test_db_base_plugin_v2 as test_db_plugin
@@ -40,7 +41,8 @@ class FakeVRouterDriver(mock.Mock):
40 41
 
41 42
 class VRouterTestPlugin(vrouter_plugin.VyattaVRouterMixin,
42 43
                         db_base_plugin_v2.NeutronDbPluginV2,
43
-                        external_net_db.External_net_db_mixin):
44
+                        external_net_db.External_net_db_mixin,
45
+                        sg_db_rpc.SecurityGroupServerRpcMixin):
44 46
 
45 47
     def delete_port(self, context, port_id, l3_port_check=False):
46 48
         super(VRouterTestPlugin, self).delete_port(context, port_id)
@@ -321,7 +323,8 @@ L3_PLUGIN_CLASS = (
321 323
     "networking_brocade.vyatta.vrouter.neutron_plugin.VyattaVRouterMixin")
322 324
 
323 325
 
324
-class TestVRouterNatPlugin(test_l3_plugin.TestL3NatBasePlugin):
326
+class TestVRouterNatPlugin(test_l3_plugin.TestL3NatBasePlugin,
327
+                           sg_db_rpc.SecurityGroupServerRpcMixin):
325 328
     supported_extension_aliases = ["external-net"]
326 329
 
327 330
 
@@ -366,3 +369,6 @@ class VRouterTestCase(test_db_plugin.NeutronDbPluginV2TestCase,
366 369
     def test_router_delete_dhcpv6_stateless_subnet_inuse_returns_409(self):
367 370
         self.skipTest("Fails because router port is created with"
368 371
                       " empty device owner")
372
+
373
+    def test_router_add_gateway_no_subnet(self):
374
+        self.skipTest("Skip because it is not supported.")

Loading…
Cancel
Save