Browse Source

Fix unit test failures for delete ipv6 and clear gateway issues

Change-Id: I1f131c9d9c4cc33143df08f3bfbad72bbd4573b9
Sripriya 4 years ago
parent
commit
f5ffb5dac9

+ 2
- 1
networking_brocade/test_discover/test_discover.py View File

@@ -29,7 +29,8 @@ def load_tests(loader, tests, pattern):
29 29
     base_path = os.path.split(base_path)[0]
30 30
     test_dirs = {'./networking_brocade/tests',
31 31
                  './networking_brocade/vdx/tests/unit/ml2/drivers/brocade',
32
-                 MLX_TEST_BASE_PATH + '/unit/ml2/drivers/brocade'}
32
+                 MLX_TEST_BASE_PATH + '/unit/ml2/drivers/brocade',
33
+                 './networking_brocade/vyatta/tests'}
33 34
     for test_dir in test_dirs:
34 35
         if not pattern:
35 36
             suite.addTests(loader.discover(test_dir, top_level_dir=base_path))

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

@@ -359,4 +359,11 @@ class VRouterTestCase(base.NeutronDbPluginV2TestCase,
359 359
     def test_router_add_interface_ipv6_subnet(self):
360 360
         self.skipTest("Fails because router port is created with"
361 361
                       " empty device owner")
362
-        super(VRouterTestCase, self).test_router_add_interface_ipv6_subnet()
362
+
363
+    def test_router_delete_ipv6_slaac_subnet_inuse_returns_409(self):
364
+        self.skipTest("Fails because router port is created with"
365
+                      " empty device owner")
366
+
367
+    def test_router_delete_dhcpv6_stateless_subnet_inuse_returns_409(self):
368
+        self.skipTest("Fails because router port is created with"
369
+                      " empty device owner")

+ 1
- 0
networking_brocade/vyatta/vrouter/neutron_plugin.py View File

@@ -470,6 +470,7 @@ class VyattaVRouterMixin(common_db_mixin.CommonDbMixin,
470 470
             router.gw_port = None
471 471
             context.session.add(router)
472 472
             context.session.expire(gw_port)
473
+            self._check_router_gw_port_in_use(context, router_id)
473 474
 
474 475
         self._delete_router_port(
475 476
             context, router_id, gw_port, external_gw=True)

Loading…
Cancel
Save