Martin Polednik has posted comments on this change.

Change subject: vdsm: add tests for hostdev mapper
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.ovirt.org/#/c/31766/1/tests/hostdevTests.py
File tests/hostdevTests.py:

Line 25: from vdsm import libvirtconnection
Line 26: from monkeypatch import MonkeyPatch
Line 27: 
Line 28: 
Line 29: class ifMock(object):
> Please be more PEP8 friendly, classes should have a CamelCase name.
Thanks, according to the article 'stub' is the correct term as far as I 
understood
Line 30: 
Line 31:     def __init__(self):
Line 32:         self.vmContainer = {}
Line 33: 


Line 47: 
Line 48:     # unfortunately, in real environment these are the most 
problematic calls
Line 49:     # but in order to test them, we would put host in danger of 
removing
Line 50:     # device needed to run properly (such as nic)
Line 51:     def dettach(self):
> maybe deAttach? or detach?
this is mistake on libvirt's side: the calls really are called dettach and 
reAttach (new libvirt actually has detach call too, not sure if that is present 
on RHEL7)
Line 52:         pass
Line 53: 
Line 54:     def reAttach(self):
Line 55:         pass


Line 279:         """
Line 280:         mapper = hostdev.HostDeviceMapper(self.cif, self.log)
Line 281: 
Line 282:         for device in libvirtconnection.get()._devices:
Line 283:             self.assertTrue(device.name() in mapper._map)
> assertIn() is backported, we can make use of it
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I15ba986c77ec710f6becd0244e86d27ec2023e27
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Martin Polednik <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to