From 75221cf43bc48507432937d91785d4ca7278f283 Mon Sep 17 00:00:00 2001 From: Adit Sarfaty Date: Thu, 18 Oct 2018 11:41:23 +0300 Subject: [PATCH] Policy plugin: Add Network & ports basic unit tests The subnets tests will be added with the DHCP support Change-Id: I24bd029a70d83b0026a6e8398350ee3e23b23876 --- vmware_nsx/tests/unit/nsx_p/test_plugin.py | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/vmware_nsx/tests/unit/nsx_p/test_plugin.py b/vmware_nsx/tests/unit/nsx_p/test_plugin.py index a31befcf03..2e64ab052b 100644 --- a/vmware_nsx/tests/unit/nsx_p/test_plugin.py +++ b/vmware_nsx/tests/unit/nsx_p/test_plugin.py @@ -66,6 +66,49 @@ class NsxPPluginTestCaseMixin( pass +class NsxPTestNetworks(test_db_base_plugin_v2.TestNetworksV2, + NsxPPluginTestCaseMixin): + + def setUp(self, plugin=PLUGIN_NAME, + ext_mgr=None, + service_plugins=None): + super(NsxPTestNetworks, self).setUp(plugin=plugin, + ext_mgr=ext_mgr) + + def tearDown(self): + super(NsxPTestNetworks, self).tearDown() + + +class NsxPTestPorts(test_db_base_plugin_v2.TestPortsV2, + NsxPPluginTestCaseMixin): + def test_update_port_update_ip_address_only(self): + self.skipTest('Multiple fixed ips on a port are not supported') + + def test_update_port_with_new_ipv6_slaac_subnet_in_fixed_ips(self): + self.skipTest('Multiple fixed ips on a port are not supported') + + def test_update_port_mac_v6_slaac(self): + self.skipTest('Multiple fixed ips on a port are not supported') + + def test_requested_subnet_id_v4_and_v6(self): + self.skipTest('Multiple fixed ips on a port are not supported') + + def test_requested_invalid_fixed_ips(self): + self.skipTest('Multiple fixed ips on a port are not supported') + + def test_requested_subnet_id_v4_and_v6_slaac(self): + self.skipTest('Multiple fixed ips on a port are not supported') + + def test_range_allocation(self): + self.skipTest('Multiple fixed ips on a port are not supported') + + def test_create_port_anticipating_allocation(self): + self.skipTest('Multiple fixed ips on a port are not supported') + + def test_update_port_add_additional_ip(self): + self.skipTest('Multiple fixed ips on a port are not supported') + + class NsxPTestSecurityGroup(NsxPPluginTestCaseMixin, test_securitygroup.TestSecurityGroups, test_securitygroup.SecurityGroupDBTestCase):