Change in vdsm[master]: v2v: test get_ova_info with tar zip and dir format

nsoffer at redhat.com nsoffer at redhat.com
Thu Dec 10 23:51:12 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: v2v: test get_ova_info with tar zip and dir format
......................................................................


Patch Set 4:

(2 comments)

https://gerrit.ovirt.org/#/c/50158/4/tests/v2vTests.py
File tests/v2vTests.py:

Line 351: 
Line 352:         with open('fake-virt-v2v.out', 'r') as f:
Line 353:             self.assertEqual(output, f.read())
Line 354: 
Line 355:     def _checkOvaInfoOutput(self, vm):
> private methods (starting with _ ) are usually put at the end of the class,
Do we need these tests to check if we can read ovf file from disk?

The simple check we had before, reading the file with the string "<ovf/>" seems good enough.

I don't think this asserts add any value, unless I'm missing something about this test.
Line 356:         self.assertEquals(vm['vmName'], 'First')
Line 357:         self.assertEquals(vm['memSize'], 2048)
Line 358:         self.assertEquals(vm['smp'], 1)
Line 359: 


Line 369:         self.assertEquals(network['type'], 'bridge')
Line 370:         self.assertEquals(network['dev'], 'Ethernet 1')
Line 371: 
Line 372: 
Line 373:     def testGetOvaInfo(self):
> this could be split in three test, but I don't mind, could be done in a lat
I think we should split the test now rather then waste people time on another patch, this is very easy change.
Line 374:         with namedTemporaryDir() as base:
Line 375:             ovapath = os.path.join(base, 'testvm.ova')
Line 376:             ovfpath = os.path.join(base, 'testvm.ovf')
Line 377:             ovf = read_ovf('test')


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id73516164e81e609c70caeac20fb819eaf04a56b
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list