Skip to content

Commit

Permalink
[FT] Make explicit the "publish" call check in "test_port_forwarding"
Browse files Browse the repository at this point in the history
The functional test "TestMaintenance.test_port_forwarding" is checking
the "registry.publish" call after calling
"delete_floatingip_port_forwarding". This patch makes this check
explicit for the expected call.

Closes-Bug: #2033387
Change-Id: I95074a0fe071e3ed8bf58c9210d63a2f30ee68a0
(cherry picked from commit d9eb044)
  • Loading branch information
ralonsoh committed Aug 30, 2023
1 parent cfd139e commit d08194b
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -939,7 +939,9 @@ def _verify_lb(test, protocol, vip_ext_port, vip_int_port):
m_publish.reset_mock()
self.pf_plugin.delete_floatingip_port_forwarding(
self.context, pf_obj['id'], fip_id)
m_publish.assert_called_once()
call = mock.call('port_forwarding', 'after_delete', self.pf_plugin,
payload=mock.ANY)
m_publish.assert_has_calls([call])

# Assert load balancer for port forwarding is stale
_verify_lb(self, 'udp', 5353, 53)
Expand Down

0 comments on commit d08194b

Please sign in to comment.