Maor Lipchuk has posted comments on this change.
Change subject: hsm:Use sd compat instead of qemu conf compat. ......................................................................
Patch Set 10:
(4 comments)
https://gerrit.ovirt.org/#/c/64951/10/tests/storage_hsm_test.py File tests/storage_hsm_test.py:
Line 98 Line 99 Line 100 Line 101 Line 102
But you check that the code raises?!
Indeed, changed the method name.
Line 88: ('0.10', '0.10', 4), Line 89: ('1.1', '0.10', 4), Line 90: ('0.10', '0.10', 3), Line 91: )) Line 92: def test_disabled_compat_raises(self, hsm_compat, qemu_config, sd_version):
This test check the invalid compat raises...
Changed to test_valid_qcow2_compat Line 93: with self.fake_volume(sc.COW_FORMAT, sd_version) as vol: Line 94: create_conf = make_config([('irs', 'qcow2_compat', qemu_config)]) Line 95: info = {"format": qemuimg.FORMAT.QCOW2, "compat": hsm_compat} Line 96: with MonkeyPatchScope([(qemuimg, 'config', create_conf),
Line 98: qemuimg.create(vol.volumePath, size=self.SIZE, Line 99: format=qemuimg.FORMAT.QCOW2) Line 100: h = FakeHSM() Line 101: self.assertNotRaises(h.verify_untrusted_volume, 'sp', Line 102: vol.sdUUID, vol.imgUUID, vol.volUUID)
But you check that the code does not raise?!
Changed the method name to indicate the test purpose: test_valid_qcow2_compat Line 103: Line 104: @permutations(( Line 105: ('1.1', '0.10', 3), Line 106: ))
Line 103: Line 104: @permutations(( Line 105: ('1.1', '0.10', 3), Line 106: )) Line 107: def test_valid_compat(self, hsm_compat, qemu_config, sd_version):
This test should test valid compats...
Changed it to test_disabled_compat_raises Line 108: with self.fake_volume(sc.COW_FORMAT, sd_version) as vol: Line 109: create_conf = make_config([('irs', 'qcow2_compat', qemu_config)]) Line 110: info = {"format": qemuimg.FORMAT.QCOW2, "compat": hsm_compat} Line 111: with MonkeyPatchScope([(qemuimg, 'config', create_conf),
vdsm-patches@lists.fedorahosted.org