remove mocks of oslo.service private members
We need to completely remove the mocks for oslo.service private members in order to decouple nova from the requirements updates and be able to update the constraint for oslo.service to a new version that has a fixture for managing the sleep call being mocked (applied in the following patch). Change-Id: I0bbd2d7f9d6eb13d97587d867ef4d651809a7dd4 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
f5be7f7843
commit
32082ebcfc
@ -6437,8 +6437,6 @@ class ComputeManagerBuildInstanceTestCase(test.NoDBTestCase):
|
|||||||
self.context, mock.sentinel.instance,
|
self.context, mock.sentinel.instance,
|
||||||
requested_networks=requested_networks)
|
requested_networks=requested_networks)
|
||||||
|
|
||||||
@mock.patch('oslo_service.loopingcall._ThreadingEvent.wait',
|
|
||||||
new=mock.Mock())
|
|
||||||
@mock.patch('nova.compute.manager.ComputeManager._deallocate_network')
|
@mock.patch('nova.compute.manager.ComputeManager._deallocate_network')
|
||||||
@mock.patch('nova.compute.manager.LOG.warning')
|
@mock.patch('nova.compute.manager.LOG.warning')
|
||||||
def test_try_deallocate_network_retry_direct(self, warning_mock,
|
def test_try_deallocate_network_retry_direct(self, warning_mock,
|
||||||
|
@ -28,8 +28,6 @@ AUTOMAP_PARTITION = "/dev/nullp77"
|
|||||||
MAP_PARTITION = "/dev/mapper/nullp77"
|
MAP_PARTITION = "/dev/mapper/nullp77"
|
||||||
|
|
||||||
|
|
||||||
# Make RetryDecorator not actually sleep on retries
|
|
||||||
@mock.patch('oslo_service.loopingcall._ThreadingEvent.wait', new=mock.Mock())
|
|
||||||
class MountTestCase(test.NoDBTestCase):
|
class MountTestCase(test.NoDBTestCase):
|
||||||
def _test_map_dev(self, partition):
|
def _test_map_dev(self, partition):
|
||||||
mount = api.Mount(mock.sentinel.image, mock.sentinel.mount_dir)
|
mount = api.Mount(mock.sentinel.image, mock.sentinel.mount_dir)
|
||||||
|
@ -34,8 +34,6 @@ if sys.version_info > (3,):
|
|||||||
long = int
|
long = int
|
||||||
|
|
||||||
|
|
||||||
# Make RetryDecorator not actually sleep on retries
|
|
||||||
@mock.patch('oslo_service.loopingcall._ThreadingEvent.wait', new=mock.Mock())
|
|
||||||
class GuestTestCase(test.NoDBTestCase):
|
class GuestTestCase(test.NoDBTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user