'Test create_group_snapshot when no pool space left.'

def test_create_group_snapshot_fail_on_no_pool_space_left(self):

    self.driver.do_setup(None)
    ctxt = context.get_admin_context()
    self.driver.create_group(ctxt, GROUP)
    volume = copy.deepcopy(GROUP_VOLUME)
    volume['size'] = ((POOL_SIZE / 2) + 1)
    self.driver.create_volume(volume)
    self.assertRaises(exception.VolumeBackendAPIException, self.driver.create_group_snapshot, ctxt, GROUP_SNAPSHOT, [volume])
    self.driver.volumes = None
    self.driver.delete_group(ctxt, GROUP, [volume])
