Mock log output from DataCore drivers

The large amount of error logging output from the DataCore API
tests is causing issues that result in hitting an error with
stestr. This logging output is not needed during unit testing,
so this just mocks out the logger to prevent them from happening.

Change-Id: Ie9c3c6e0ee0826d4508599125155b6aceb64d369
Closes-bug: #1775707
This commit is contained in:
Sean McGinnis 2018-06-07 16:17:18 -05:00
parent 2b5eb29e86
commit 1246c6ce2d
1 changed files with 3 additions and 0 deletions

View File

@ -54,6 +54,9 @@ class DataCoreClientTestCase(test.TestCase):
self.client = api.DataCoreClient('hostname', 'username', 'password', 1)
self.client.API_RETRY_INTERVAL = 0
# Make sure failure logging does not get emitted during testing
self.mock_object(api, 'LOG')
def _get_service_side_effect(self, service_name):
self.assertIn(service_name,
[