'Passing an invalid host to the setup should raise an error'

@mock.patch('cinder.volume.drivers.ibm.ibm_storage.xiv_proxy.client.XCLIClient')
@mock.patch('cinder.volume.drivers.ibm.ibm_storage.xiv_proxy.socket.getfqdn', new=mock.MagicMock(return_value='test_hostname'))
def test_setup_should_fail_if_connection_is_invalid(self, mock_xcli):

    driver = mock.MagicMock()
    driver.VERSION = 'VERSION'
    p = self.proxy(self.default_storage_info, mock.MagicMock(), test_mock.cinder.exception, driver)
    mock_xcli.connect_multiendpoint_ssl = mock.MagicMock(side_effect=errors.ConnectionError('bla', 'bla', ElementTree.Element('bla')))
    self.assertRaises(test_mock.cinder.exception.HostNotFound, p.setup, {})
