Move eventlet to test-requirements. Remove greenlet.
The eventlet library is used in testing. Move it to test-requirements.txt. The greenlet library is not directly used. Remove it from requirements.txt. Make it more explicit which tests need the eventlet mock. Change-Id: I117ec6a2ee4bb1a52e6de088cd1ddd5b0cce5efe
This commit is contained in:
parent
0d662256bd
commit
3c4af656b1
|
@ -24,7 +24,6 @@ from ironic_lib import exception
|
|||
from ironic_lib import utils
|
||||
|
||||
|
||||
@mock.patch.object(eventlet.greenthread, 'sleep', lambda seconds: None)
|
||||
class DiskPartitionerTestCase(test_base.BaseTestCase):
|
||||
|
||||
def test_add_partition(self):
|
||||
|
@ -74,6 +73,7 @@ class DiskPartitionerTestCase(test_base.BaseTestCase):
|
|||
mock_utils_exc.assert_called_once_with(
|
||||
'fuser', '/dev/fake', run_as_root=True, check_exit_code=[0, 1])
|
||||
|
||||
@mock.patch.object(eventlet.greenthread, 'sleep', lambda seconds: None)
|
||||
@mock.patch.object(disk_partitioner.DiskPartitioner, '_exec',
|
||||
autospec=True)
|
||||
@mock.patch.object(utils, 'execute', autospec=True)
|
||||
|
@ -104,6 +104,7 @@ class DiskPartitionerTestCase(test_base.BaseTestCase):
|
|||
'fuser', '/dev/fake', run_as_root=True, check_exit_code=[0, 1])
|
||||
self.assertEqual(2, mock_utils_exc.call_count)
|
||||
|
||||
@mock.patch.object(eventlet.greenthread, 'sleep', lambda seconds: None)
|
||||
@mock.patch.object(disk_partitioner.DiskPartitioner, '_exec',
|
||||
autospec=True)
|
||||
@mock.patch.object(utils, 'execute', autospec=True)
|
||||
|
@ -133,6 +134,8 @@ class DiskPartitionerTestCase(test_base.BaseTestCase):
|
|||
'fuser', '/dev/fake', run_as_root=True, check_exit_code=[0, 1])
|
||||
self.assertEqual(20, mock_utils_exc.call_count)
|
||||
|
||||
# Mock the eventlet.greenthread.sleep for the looping_call
|
||||
@mock.patch.object(eventlet.greenthread, 'sleep', lambda seconds: None)
|
||||
@mock.patch.object(disk_partitioner.DiskPartitioner, '_exec',
|
||||
autospec=True)
|
||||
@mock.patch.object(utils, 'execute', autospec=True)
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
# process, which may cause wedges in the gate later.
|
||||
|
||||
pbr>=1.6 # Apache-2.0
|
||||
eventlet!=0.18.3,>=0.18.2 # MIT
|
||||
greenlet>=0.3.2 # MIT
|
||||
oslo.concurrency>=3.5.0 # Apache-2.0
|
||||
oslo.config>=3.4.0 # Apache-2.0
|
||||
oslo.i18n>=2.1.0 # Apache-2.0
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
coverage>=3.6 # Apache-2.0
|
||||
discover # BSD
|
||||
eventlet!=0.18.3,>=0.18.2 # MIT
|
||||
hacking<0.11,>=0.10.0
|
||||
oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0
|
||||
oslotest>=1.10.0 # Apache-2.0
|
||||
|
|
Loading…
Reference in New Issue