Nir Soffer has posted comments on this change. Change subject: vdsm: verifyingTransport testing ......................................................................
Patch Set 5: (4 comments) Nice! but you forgot to address two comments. http://gerrit.ovirt.org/#/c/28858/5/lib/vdsm/verifyingtransport.py File lib/vdsm/verifyingtransport.py: Line 27: Line 28: import httplib Line 29: import socket Line 30: import ssl Line 31: import xmlrpclib Maybe move these 3 small classes to sslutils? Line 32: Line 33: Line 34: class VerifyingHTTPSConnection(httplib.HTTPSConnection): Line 35: def __init__(self, host, port=None, key_file=None, cert_file=None, http://gerrit.ovirt.org/#/c/28858/5/tests/verifyingTransportTests.py File tests/verifyingTransportTests.py: Line 24: Line 25: from vdsm.verifyingtransport import VerifyingSafeTransport Line 26: from vdsm.sslutils import SSLServerSocket Line 27: from testrunner import VdsmTestCase as TestCaseBase Line 28: from jsonRpcHelper import KEY_FILE, CRT_FILE Don't import from jsonRpcHelpler - see my comment in http://gerrit.ovirt.org/#/c/28858/3/tests/verifyingTransportTests.py Line 29: Line 30: CACERT = None Line 31: HOST = '127.0.0.1' Line 32: Line 45: self.server.socket = SSLServerSocket(raw=self.server.socket, Line 46: keyfile=KEY_FILE, Line 47: certfile=CRT_FILE, Line 48: ca_certs=CACERT) Line 49: _, self.port = self.server.socket.getsockname() Nice Line 50: self.server.register_instance(MathService()) Line 51: self.start() Line 52: Line 53: def start(self): Line 85: try: Line 86: self.assertEquals(client.add(2, 3), 5) Line 87: finally: Line 88: server.stop() Line 89: client.close() And where are the tests for invalid certificate/key? See my comment in http://gerrit.ovirt.org/#/c/28858/3/tests/verifyingTransportTests.py -- To view, visit http://gerrit.ovirt.org/28858 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1a706d4d90fdf446b06530288d947d96934e45f2 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Saggi Mizrahi <[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
