Merge "Tests: Don't attempt connection for Coho driver init"

This commit is contained in:
Jenkins 2016-05-20 13:52:24 +00:00 committed by Gerrit Code Review
commit 45d0f6270c

View File

@ -252,7 +252,11 @@ class CohoDriverTest(test.TestCase):
mock_get_volume_location.assert_has_calls(
[mock.call(INVALID_SNAPSHOT['volume_id'])])
def test_snapshot_failure_when_remote_is_unreachable(self):
@mock.patch('cinder.volume.drivers.coho.Client.init_socket',
side_effect=exception.CohoException(
"Failed to establish connection."))
def test_snapshot_failure_when_remote_is_unreachable(self,
mock_init_socket):
drv = coho.CohoDriver(configuration=self.configuration)
mock_get_volume_location = self.mock_object(coho.CohoDriver,