Change in vdsm[master]: Simplify tests for qemuimg to allow additional capabilities ...

nsoffer at redhat.com nsoffer at redhat.com
Fri Jan 16 17:18:55 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: Simplify tests for qemuimg to allow additional capabilities checks
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.ovirt.org/#/c/36366/5/tests/qemuimgTests.py
File tests/qemuimgTests.py:

Line 268:             self.assertEqual(cmd, expected)
Line 269:             return 0, '', ''
Line 270: 
Line 271:         with FakeCmd(utils, 'execCmd', create):
Line 272:             qemuimg._supports_qcow2_compat('create')
> This is not being tested before. Since we are faking the result of qemuimg.
I think we did test before in CommandsTests.supported

You fake _supports_qcow2_comapt with:

    self.supported("convert", False)

Which is:

    def check(command, result):
        self.assertEqual(command, "convert")
        return False

So we don't need to test this again.

Even if we did not test it, this class is about testing _supports_qcow_compat, and not about testing the callers, so this does not belong here.
Line 273: 
Line 274:     def test_convert_command(self, **kw):
Line 275:         def convert(cmd, **kw):
Line 276:             expected = [QEMU_IMG, 'convert', '-O', 'qcow2', '-o', '?',


-- 
To view, visit http://gerrit.ovirt.org/36366
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I386772bf2a25a880b5ad387f284679eed81c5615
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amador Pahim <apahim at redhat.com>
Gerrit-Reviewer: Amador Pahim <apahim at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list