Change in vdsm[master]: tests: Create fake block volume metadata

nsoffer at redhat.com nsoffer at redhat.com
Fri Apr 8 09:25:35 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: tests: Create fake block volume metadata
......................................................................


Patch Set 2: Code-Review-1

(2 comments)

Our fake helpers becoming complex like the code itself, lets add some tests to make sure they work and not brake by future changes.

https://gerrit.ovirt.org/#/c/55704/2/tests/storagetestlib.py
File tests/storagetestlib.py:

Line 77:     md[sd.DMDK_POOLS] = pools if pools is not None else [str(uuid.uuid4())]
Line 78:     return md
Line 79: 
Line 80: 
Line 81: def make_blocksd_manifest(tmpdir, fake_lvm, sduuid=None, devices=None):
Can you add a test for this helper?
Line 82:     if sduuid is None:
Line 83:         sduuid = str(uuid.uuid4())
Line 84:     if devices is None:
Line 85:         devices = get_random_devices()


Line 139:         make_file(mdfile)
Line 140:     return imguuid, voluuid
Line 141: 
Line 142: 
Line 143: def make_block_volume(lvm, sd_manifest, size, imguuid, voluuid,
This became complex, can you add a test for this helper?
Line 144:                       parent_vol_id=volume.BLANK_UUID,
Line 145:                       vol_format=volume.RAW_FORMAT,
Line 146:                       prealloc=volume.PREALLOCATED_VOL,
Line 147:                       disk_type=image.UNKNOWN_DISK_TYPE,


-- 
To view, visit https://gerrit.ovirt.org/55704
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6be6abe9cc8217f9b825a45051dd40a4f86717f4
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list