Change in vdsm[master]: vdsm: refactor has_channel using etree

fromani at redhat.com fromani at redhat.com
Wed Sep 3 14:28:29 UTC 2014


Francesco Romani has posted comments on this change.

Change subject: vdsm: refactor has_channel using etree
......................................................................


Patch Set 1: Code-Review+1

(2 comments)

nice start. A few comments inside about test improvements.

http://gerrit.ovirt.org/#/c/32402/1/tests/vmTests.py
File tests/vmTests.py:

Line 481:         self.assertXML(domxml.dom, channelXML, 'devices/channel')
Line 482: 
Line 483:     @permutations([[True], [False]])
Line 484:     def testHasChannel(self, expected):
Line 485:         path = '/tmp/channel-socket'
better


  with namedTemporaryDir() as path:
    ...
Line 486:         name = 'org.linux-kvm.port.0'
Line 487:         domxml = vmxml.Domain(self.conf, self.log, caps.Architecture.X86_64)
Line 488: 
Line 489:         if expected:


Line 493:                                 'org.linux-kvm.port.0')
Line 494:         if expected:
Line 495:             self.assertTrue(ret)
Line 496:         else:
Line 497:             self.assertFalse(ret)
I find

  self.assertEqual(ret, expected)

shorter and nicer
Line 498: 
Line 499:     def testInputXMLX86_64(self):
Line 500:         expectedXMLs = [
Line 501:             """<input bus="ps2" type="mouse"/>""",


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie35718b7abc8cb2aea75afc1bd3b939bae68903f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list