Change in vdsm[master]: tests: Add NetworkTest.testAddDelNetworkDhcp

pbenas at redhat.com pbenas at redhat.com
Thu Nov 14 15:16:00 UTC 2013


Petr Benas has posted comments on this change.

Change subject: tests: Add NetworkTest.testAddDelNetworkDhcp
......................................................................


Patch Set 5:

(3 comments)

....................................................
File tests/functional/dnsmasq.py
Line 43:     def stop(self):
Line 44:         '''
Line 45:         Testing if dnsmqasq is running here reports correct message when
Line 46:         dnsmasq fails to start without the need of additional timeout
Line 47:         between the start attempt and the check.
I will move the check to the start method with really short timeout (< 1 sec). I suppose that in any usecase of the module the cleanup calling stop() would be used, but it makes more sense checking after start to avoid waiting to dhcpd server response. 

I agree with making it more generic and throw something else than SkipTest.
Line 48:         '''
Line 49:         if self.proc.returncode:
Line 50:             raise SkipTest('Failed to start dnsmasq DHCP server.')
Line 51: 


....................................................
File tests/functional/networkTests.py
Line 1547:             dummy.setLinkUp(left)
Line 1548:             with dnsmasqDhcp(left):
Line 1549:                 network = {NETWORK_NAME: {'nic': right, 'bridged': bridged,
Line 1550:                                           'bootprot': 'dhcp'}}
Line 1551:                 with self.vdsm_net.pinger():
I had it with checkConnetivity=False but then I realized some other tests use pinger so I used it too to test the connectivity. No problem returning back to not testing connectivity.
Line 1552:                     status, msg = self.vdsm_net.setupNetworks(network, {}, {})
Line 1553:                     self.assertEqual(status, SUCCESS, msg)
Line 1554:                     self.assertNetworkExists(NETWORK_NAME)
Line 1555: 


....................................................
File tests/functional/veth.py
Line 38:         pass
Line 39:     else:
Line 40:         return (leftPoint, rightPoint)
Line 41: 
Line 42:     raise SkipTest('Failed to create a veth interface')
I don't get why pyflakes gods want it this way, but can write it like this.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dbb59f3cd420b2071eb0ec42f9816ab52151bce
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Benas <pbenas at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Petr Benas <pbenas at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list