storage/lvm: make the "hack" work with CallbackPool instances
CallbackPool instances are no ThinPool instances, but behave identically, if their backend driver is a ThinPool instance.
This commit is contained in:
parent
409ea88a66
commit
42d62bb47e
@ -509,7 +509,7 @@ class ThinVolume(qubes.storage.Volume):
|
||||
# HACK: neat trick to speed up testing if you have same physical thin
|
||||
# pool assigned to two qubes-pools i.e: qubes_dom0 and test-lvm
|
||||
# pylint: disable=line-too-long
|
||||
if isinstance(src_volume.pool, ThinPool) and \
|
||||
if hasattr(src_volume.pool, 'thin_pool') and \
|
||||
src_volume.pool.thin_pool == self.pool.thin_pool: # NOQA
|
||||
yield from self._commit(src_volume.path[len('/dev/'):], keep=True)
|
||||
else:
|
||||
|
@ -792,7 +792,6 @@ class TC_00_ThinPool(ThinPoolBase):
|
||||
|
||||
# also should be different than source volume (clone, not the same LV)
|
||||
self.assertNotEqual(uuid_after, source_uuid)
|
||||
if VOLUME_CLASS == ThinVolume:
|
||||
self.assertEqual(self._get_lv_origin_uuid(volume.path), source_uuid)
|
||||
|
||||
expected_revisions = {
|
||||
|
Loading…
Reference in New Issue
Block a user