'Fail to clone raw image then verify volume is in error state.'

@mock.patch('cinder.image.image_utils.check_available_space')
@mock.patch.object(cinder.image.glance, 'get_default_image_service')
def test_create_vol_from_image_status_error(self, mock_gdis, mock_check_space):

    with mock.patch.object(self.volume.driver, 'clone_image') as mock_clone_image:
        mock_clone_image.side_effect = exception.CinderException
        with mock.patch.object(self.volume.driver, 'create_volume'):
            with mock.patch.object(create_volume.CreateVolumeFromSpecTask, '_copy_image_to_volume') as mock_copy:
                self._create_volume_from_image('error', raw=True, clone_error=True)
                self.assertFalse(mock_copy.called)
            self.assertTrue(mock_clone_image.called)
            self.assertFalse(self.volume.driver.create_volume.called)
            self.assertTrue(mock_gdis.called)
