Change in vdsm[master]: storage: add block device naming tests
mpolednik at redhat.com
mpolednik at redhat.com
Thu Apr 28 13:28:56 UTC 2016
Martin Polednik has uploaded a new change for review.
Change subject: storage: add block device naming tests
......................................................................
storage: add block device naming tests
Change-Id: I492a1849109b6f852ccd015d487c6cb7441febdb
Signed-off-by: Martin Polednik <mpolednik at redhat.com>
---
M tests/vmStorageTests.py
1 file changed, 47 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/02/56802/1
diff --git a/tests/vmStorageTests.py b/tests/vmStorageTests.py
index b16889d..9534f69 100644
--- a/tests/vmStorageTests.py
+++ b/tests/vmStorageTests.py
@@ -598,6 +598,53 @@
self.assertXMLEqual(leases[0].toxml(), xml)
+ at expandPermutations
+class TestDriveNaming(VdsmTestCase):
+
+ @permutations([
+ ['ide', -1, 'hda'],
+ ['ide', 0, 'hda'],
+ ['ide', 1, 'hda'],
+ ['ide', 2, 'hdb'],
+ ['ide', 26, 'hdz'],
+ ['ide', 27, 'hda'],
+ ['ide', 27, 'hda'],
+
+ ['scsi', -1, 'sda'],
+ ['scsi', 0, 'sda'],
+ ['scsi', 1, 'sda'],
+ ['scsi', 2, 'sdb'],
+ ['scsi', 26, 'sdz'],
+ ['scsi', 27, 'sda'],
+ ['scsi', 28, 'sdb'],
+
+ ['virtio', -1, 'vda'],
+ ['virtio', 0, 'vda'],
+ ['virtio', 1, 'vda'],
+ ['virtio', 2, 'vdb'],
+ ['virtio', 26, 'vdz'],
+ ['virtio', 27, 'vda'],
+ ['virtio', 28, 'vdb'],
+
+ ['fdc', -1, 'fda'],
+ ['fdc', 0, 'fda'],
+ ['fdc', 1, 'fda'],
+ ['fdc', 2, 'fdb'],
+ ['fdc', 26, 'fdz'],
+ ['fdc', 27, 'fda'],
+ ['fdc', 28, 'fdb'],
+ ])
+ def test_ide_drive(self, interface, index, expected_name):
+ conf = drive_config(
+ device='disk',
+ iface=interface,
+ index='2',
+ )
+
+ drive = Drive({}, self.log, **conf)
+ self.assertTrue(drive.name, expected_name)
+
+
def make_volume_chain(path="path", offset=0, vol_id="vol_id", dom_id="dom_id"):
return [{"leasePath": path,
"leaseOffset": offset,
--
To view, visit https://gerrit.ovirt.org/56802
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I492a1849109b6f852ccd015d487c6cb7441febdb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
More information about the vdsm-patches
mailing list