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.

"rm -rf .tox/lower-constraints/*" in testenv command in tox.ini
is unnecessary, so it is dropped too.

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

Change-Id: I95490cba503d3f3a61bdc28ef63edc82a3ae1be3
This commit is contained in:
Nate Johnston 2019-02-18 21:54:55 +02:00 committed by Akihiro Motoki
parent e7f2f781ee
commit 36ca752e80
2 changed files with 2 additions and 4 deletions

View File

@ -34,7 +34,7 @@ class FWaaSL3LoggingExtensionInitializeTestCase(base.L3LoggingExtBaseTestCase):
@mock.patch.object(registry, 'register')
@mock.patch.object(resources_rpc, 'ResourcesPushRpcCallback')
def test_initialize_subscribed_to_rpc(self, rpc_mock, subscribe_mock):
call_to_patch = 'neutron.common.rpc.Connection'
call_to_patch = 'neutron_lib.rpc.Connection'
with mock.patch(call_to_patch,
return_value=self.connection) as create_connection:
self.fw_l3_log_ext.initialize(

View File

@ -13,11 +13,9 @@ deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/re
whitelist_externals =
sh
find
rm
commands =
find . -type f -name "*.py[c|o]" -delete
find . -type d -name "__pycache__" -delete
rm -rf .tox/lower-constraints/*
find . -path "*/__pycache__*" -delete
{toxinidir}/tools/ostestr_compat_shim.sh {posargs}
# there is also secret magic in ostestr which lets you run in a fail only
# mode. To do this define the TRACE_FAILONLY environmental variable.