From 49817d31b15d3439727218ec2012a483e113d9b9 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Thu, 3 Sep 2020 17:01:19 -0500 Subject: [PATCH] Handle oslo.messaging ping endpoint We have a test that attempts to emulate a messaging endpoint and fails if anything other than the endpoint's target property is inspected. With the addition of the ping endpoint in I51cf67e060f240e6eb82260e70a057fe599f9063, this now blows up with the latest oslo.messagin release. To handle this situation, our fake class just needs to also check for the oslo_rpc_server_ping attribute. Change-Id: I970c953f9c21df99fac5f572f9e9dca5c615f06c Signed-off-by: Sean McGinnis --- nova/tests/unit/test_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/tests/unit/test_test.py b/nova/tests/unit/test_test.py index 1ef3b311e905..78bb36815b97 100644 --- a/nova/tests/unit/test_test.py +++ b/nova/tests/unit/test_test.py @@ -50,7 +50,7 @@ class IsolationTestCase(test.TestCase): class NeverCalled(object): def __getattribute__(self, name): - if name == 'target': + if name == 'target' or name == 'oslo_rpc_server_ping': # oslo.messaging 5.31.0 explicitly looks for 'target' # on the endpoint and checks it's type, so we can't avoid # it here, just ignore it if that's the case.