[OVN][FT] Make explicit the "publish" call check in "test_port_forwarding"
The functional test "TestMaintenance.test_port_forwarding" is checking the "registry.publish" call after calling "create_floatingip_port_forwarding" and "update_floatingip_port_forwarding". This patch makes this check explicit for the expected call. This patch is similar to [1]. [1]https://review.opendev.org/c/openstack/neutron/+/893028 Related-Bug: #2033387 Change-Id: I595dbd9b3abf413408fddf60735c0e8bd54e1d5c (cherry picked from commit2f637b2cb9) (cherry picked from commit0178671955) Conflicts: neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_maintenance.py
This commit is contained in:
@@ -1006,7 +1006,9 @@ class TestMaintenance(_TestMaintenanceHelper):
|
||||
pf_def.INTERNAL_IP_ADDRESS: p1_ip}
|
||||
pf_obj = self.pf_plugin.create_floatingip_port_forwarding(
|
||||
self.context, fip_id, **fip_attrs(fip_pf_args))
|
||||
m_notify.assert_called_once()
|
||||
call = mock.call('port_forwarding', 'after_create', self.pf_plugin,
|
||||
payload=mock.ANY)
|
||||
m_notify.assert_has_calls([call])
|
||||
|
||||
# Assert load balancer for port forwarding was not created
|
||||
self.assertFalse(self._find_pf_lb(router_id, fip_id))
|
||||
@@ -1024,7 +1026,9 @@ class TestMaintenance(_TestMaintenanceHelper):
|
||||
m_notify.reset_mock()
|
||||
self.pf_plugin.update_floatingip_port_forwarding(
|
||||
self.context, pf_obj['id'], fip_id, **fip_attrs(fip_pf_args))
|
||||
m_notify.assert_called_once()
|
||||
call = mock.call('port_forwarding', 'after_update', self.pf_plugin,
|
||||
payload=mock.ANY)
|
||||
m_notify.assert_has_calls([call])
|
||||
|
||||
# Assert load balancer for port forwarding is stale
|
||||
_verify_lb(self, 'tcp', 2222, 22)
|
||||
|
||||
Reference in New Issue
Block a user