Change TestOvnNbIndex.test_find to use Port_Group

"Logical_Switch" registers are frequently used in functional tests.
Stressing this table could lead to unexpected and random errors
during the tests execution. Instead of this, "Port_Group" table
is used to check the "lookup" method.

Change-Id: I685d6841ce9f5759ea117ccc8b2e37126702788f
This commit is contained in:
Rodolfo Alonso Hernandez 2020-07-27 16:07:43 +00:00
parent 469095b447
commit f345c771a4
1 changed files with 2 additions and 2 deletions

View File

@ -31,9 +31,9 @@ class TestOvnNbIndex(base.FunctionalTestCase):
basename = utils.get_rand_device_name('testswitch')
with self.api.transaction(check_error=True) as txn:
for i in range(length):
txn.add(self.api.ls_add("%s%d" % (basename, i)))
txn.add(self.api.pg_add("%s%d" % (basename, i)))
match = "%s%d" % (basename, length / 2)
sw = self.api.lookup('Logical_Switch', match)
sw = self.api.lookup('Port_Group', match)
self.assertEqual(sw.name, match)
def test_default_indices(self):