NSX|V: fix broken unit tests

Commit ff4067af5ba52cc205f38d12cdf68bd454445ced broke the V tests.
This is due to the fact that V creates a DHCP port with each subnet

Change-Id: Ib8ef62dbba764b4cd8d2c77f72626488bb8a29c0
This commit is contained in:
Gary Kotton 2016-03-18 11:59:43 -07:00
parent b6ddab61e9
commit 0bfc4f0481

View File

@ -355,6 +355,17 @@ class TestPortsV2(NsxVPluginV2TestCase,
VIF_TYPE = nsx_constants.VIF_TYPE_DVS
HAS_PORT_FILTER = True
def test_get_ports_count(self):
with self.port(), self.port(), self.port(), self.port() as p:
tenid = p['port']['tenant_id']
ctx = context.Context(user_id=None, tenant_id=tenid,
is_admin=False)
pl = manager.NeutronManager.get_plugin()
count = pl.get_ports_count(ctx, filters={'tenant_id': [tenid]})
# Each port above has subnet => we have an additional port
# for DHCP
self.assertEqual(8, count)
def test_update_port_mac_v6_slaac(self):
self.skipTest('No DHCP v6 Support yet')