Make unit tests work with os-vif 1.4.0

The expected VIFHostUser object in this test is setting the
vif_name field on the object which didn't actually exist until
version 1.1 of that object which is being released in os-vif 1.4.0.

The test passes against os-vif 1.3.0 and VIFHostUser 1.0 today
because the obj_to_primitive() routine will not include anything
that's not a field on the object, which is vif_name in this case.

But when moving to os-vif 1.4.0, we're hitting a failure because
the expected object has vif_name set but the actual object doesn't
because though the vif_name field is defined, it's not actually
used yet in the code, so it's not set in the primitive and our
object comparison fails.

Change-Id: I1c27726d583a41ab69d9eab23e8484e7e047942d
Closes-Bug: #1656025
This commit is contained in:
Matt Riedemann
2017-01-12 11:49:52 -05:00
parent 38a43e56dd
commit d33a2b1cbb

View File

@@ -572,7 +572,6 @@ class OSVIFUtilTestCase(test.NoDBTestCase):
plugin="ovs",
port_profile=osv_objects.vif.VIFPortProfileOpenVSwitch(
interface_id="dc065497-3c8d-4f44-8fb4-e1d33c16a536"),
vif_name="nicdc065497-3c",
path='/fake/socket',
mode='client',
has_traffic_filtering=True,