Fix bug in tests.serverprovider.test_virsh
VirshProviderTestCase.test_create_vm_ip_failed was fixed by correct mocking. Change-Id: I72f1386437e2d13f5deb09159523729517e94d12 Closes-Bug: #1259246
This commit is contained in:
parent
3a60bd6b9b
commit
db3dd6b073
@ -65,7 +65,8 @@ class VirshProviderTestCase(test.BaseTestCase):
|
||||
|
||||
@mock.patch('rally.serverprovider.providers.virsh.netaddr.IPAddress')
|
||||
@mock.patch('rally.serverprovider.providers.virsh.subprocess')
|
||||
def test_create_vm_ip_failed(self, mock_subp, mock_ipaddress):
|
||||
@mock.patch('time.sleep')
|
||||
def test_create_vm_ip_failed(self, mock_sleep, mock_subp, mock_ipaddress):
|
||||
mock_ipaddress.side_effect = netaddr.core.AddrFormatError
|
||||
server = self.provider.create_vm('name')
|
||||
mock_subp.assert_has_calls(3 * [
|
||||
|
Loading…
x
Reference in New Issue
Block a user