Francesco Romani has posted comments on this change. Change subject: tests: InterfaceSampleTests are failing with IOError ......................................................................
Patch Set 11: Code-Review-1 (2 comments) Sorry, this is actually my fault. https://gerrit.ovirt.org/#/c/38113/11/lib/vdsm/libvirtconnection.py File lib/vdsm/libvirtconnection.py: Line 76: __connections = {} Line 77: __connectionLock = threading.Lock() Line 78: Line 79: Line 80: def read_password(): no need to make this public, please see my other comments into samplingTests.py Line 81: with open(constants.P_VDSM_LIBVIRT_PASSWD) as passwd_file: Line 82: return passwd_file.readline().rstrip("\n") Line 83: Line 84: https://gerrit.ovirt.org/#/c/38113/11/tests/samplingTests.py File tests/samplingTests.py: Line 145: s1 = sampling.InterfaceSample(lo) Line 146: s1.operstate = 'x' Line 147: self.assertEquals('operstate:x', s1.connlog_diff(s0)) Line 148: Line 149: def read_password(): I'm deeply sorry that my probably confusing former comment mislead you. I meant that _this_ method here can (and should) be a module-private free function, and there is no need to change lib/vdsm/libvirtconnection.py So, let's just move this tiny function out of InterfaceSampleTests class, and have def _read_password(): return 'password' at module (being module samplingTests.py) level. Line 150: return 'password' Line 151: Line 152: @MonkeyPatch(libvirtconnection, 'read_password', read_password) Line 153: @ValidateRunningAsRoot -- To view, visit https://gerrit.ovirt.org/38113 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id1de7ed2222c9f531d490ffdd3f71a3130faf63b Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Madhu Pavan <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Madhu Pavan <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[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
