Browse Source

Fix gate issues on master

We recently removed nenutron.common.rpc [1] as the rpc module lives in
neutron-lib now. This project was missed because I didn't find
neutron.common.rpc as an import. This patch switches rpc uses over to
neutron-lib.

This also addresses an issue where toxenv fails when it encounters a
non-empty __pycache__ directory. This adjusts the options passed to
find so that it is tolerant of this scenario and allows tox runs to
proceed.

[1] https://review.openstack.org/#/c/634790/

Change-Id: Ice83f7574f146436e3db045693b530f0cfeda049
changes/40/636140/5
Boden R 2 years ago
committed by Ryan Tidwell
parent
commit
19aed83ff1
No known key found for this signature in database GPG Key ID: A1C63854C1CDF372
  1. 4
      neutron_dynamic_routing/tests/unit/services/bgp/scheduler/test_bgp_dragent_scheduler.py
  2. 2
      neutron_dynamic_routing/tests/unit/services/bgp/test_bgp_plugin.py
  3. 2
      tox.ini

4
neutron_dynamic_routing/tests/unit/services/bgp/scheduler/test_bgp_dragent_scheduler.py

@ -88,7 +88,7 @@ class TestSchedulerCallback(TestBgpDrAgentSchedulerBaseTestCase):
'agentnotifiers.bgp_dr_rpc_agent_api.'
'BgpDrAgentNotifyApi')
bgp_notify_p.start()
rpc_conn_p = mock.patch('neutron.common.rpc.Connection')
rpc_conn_p = mock.patch('neutron_lib.rpc.Connection')
rpc_conn_p.start()
self.plugin = bgp_plugin.BgpPlugin()
self.scheduler = bgp_dras.ChanceScheduler()
@ -299,7 +299,7 @@ class TestRescheduleBgpSpeaker(TestBgpDrAgentSchedulerBaseTestCase,
'agentnotifiers.bgp_dr_rpc_agent_api.'
'BgpDrAgentNotifyApi')
bgp_notify_p.start()
rpc_conn_p = mock.patch('neutron.common.rpc.Connection')
rpc_conn_p = mock.patch('neutron_lib.rpc.Connection')
rpc_conn_p.start()
self.plugin = bgp_plugin.BgpPlugin()
self.scheduler = bgp_dras.ChanceScheduler()

2
neutron_dynamic_routing/tests/unit/services/bgp/test_bgp_plugin.py

@ -34,7 +34,7 @@ class TestBgpPlugin(base.BaseTestCase):
'agentnotifiers.bgp_dr_rpc_agent_api.'
'BgpDrAgentNotifyApi')
bgp_notify_p.start()
rpc_conn_p = mock.patch('neutron.common.rpc.Connection')
rpc_conn_p = mock.patch('neutron_lib.rpc.Connection')
rpc_conn_p.start()
admin_ctx_p = mock.patch('neutron_lib.context.get_admin_context')
self.admin_ctx_m = admin_ctx_p.start()

2
tox.ini

@ -19,7 +19,7 @@ whitelist_externals =
sh
commands =
find . -type f -name "*.py[c|o]" -delete
find . -type d -name "__pycache__" -delete
find . -depth -path "*/__pycache__*" -delete
stestr run {posargs}
# there is also secret magic in stestr which lets you run in a fail only
# mode. To do this define the TRACE_FAILONLY environmental variable.

Loading…
Cancel
Save