Hello Nir Soffer, Freddy Rolland, Ala Hino,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/60977
to review the following change.
Change subject: qemuimg: Fix tests with non-default qcow2_compat
......................................................................
qemuimg: Fix tests with non-default qcow2_compat
In commit 808ccde4de35 (qemuimg: Make QCOW2_COMPAT configurable) we
added a configuration for qcow2_compat. When running the tests on a
hypervisor with non-default configuration, the tests assuming the
hardcoded value are now failing.
Fix by using standard configuration in the tests, overriding the host
/etc/vdsm/vdsm.conf contents.
Change-Id: Icebec8f2272df605867bf16e351daa48547c0d78
Signed-off-by: Nir Soffer <[email protected]>
Reviewed-on: https://gerrit.ovirt.org/57457
Continuous-Integration: Jenkins CI
Reviewed-by: Tal Nisan <[email protected]>
Reviewed-by: Freddy Rolland <[email protected]>
Reviewed-by: Ala Hino <[email protected]>
---
M tests/qemuimgTests.py
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/77/60977/1
diff --git a/tests/qemuimgTests.py b/tests/qemuimgTests.py
index ffc9428..3426557 100644
--- a/tests/qemuimgTests.py
+++ b/tests/qemuimgTests.py
@@ -28,6 +28,8 @@
QEMU_IMG = qemuimg._qemuimg.cmd
+CONFIG = make_config([('irs', 'qcow2_compat', '0.10')])
+
class CommandTests(TestCaseBase):
@@ -152,6 +154,7 @@
with MonkeyPatchScope([(qemuimg, '_supports_qcow2_compat',
self.supported('create', True)),
+ (qemuimg, 'config', CONFIG),
(commands, 'execCmd', create)]):
qemuimg.create('image', format='qcow2')
@@ -199,6 +202,7 @@
self.supported('convert', True)),
(qemuimg, '_supports_src_cache',
self.supported('convert', False)),
+ (qemuimg, 'config', CONFIG),
(qemuimg, 'QemuImgOperation', convert)]):
qemuimg.convert('src', 'dst', dstFormat='qcow2')
@@ -212,6 +216,7 @@
self.supported('convert', True)),
(qemuimg, '_supports_src_cache',
self.supported('convert', False)),
+ (qemuimg, 'config', CONFIG),
(qemuimg, 'QemuImgOperation', convert)]):
qemuimg.convert('src', 'dst', dstFormat='qcow2')
@@ -226,6 +231,7 @@
self.supported('convert', True)),
(qemuimg, '_supports_src_cache',
self.supported('convert', False)),
+ (qemuimg, 'config', CONFIG),
(qemuimg, 'QemuImgOperation', convert)]):
qemuimg.convert('src', 'dst', dstFormat='qcow2',
backing='bak')
@@ -240,6 +246,7 @@
self.supported('convert', True)),
(qemuimg, '_supports_src_cache',
self.supported('convert', False)),
+ (qemuimg, 'config', CONFIG),
(qemuimg, 'QemuImgOperation', convert)]):
qemuimg.convert('src', 'dst', dstFormat='qcow2',
backingFormat='qcow2')
@@ -255,6 +262,7 @@
self.supported('convert', True)),
(qemuimg, '_supports_src_cache',
self.supported('convert', False)),
+ (qemuimg, 'config', CONFIG),
(qemuimg, 'QemuImgOperation', convert)]):
qemuimg.convert('src', 'dst', dstFormat='qcow2',
backing='bak', backingFormat='qcow2')
--
To view, visit https://gerrit.ovirt.org/60977
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icebec8f2272df605867bf16e351daa48547c0d78
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.0
Gerrit-Owner: Adam Litke <[email protected]>
Gerrit-Reviewer: Ala Hino <[email protected]>
Gerrit-Reviewer: Freddy Rolland <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/admin/lists/[email protected]