From 9cd46a4461c3fb060eedadf457d587e8d019bdef Mon Sep 17 00:00:00 2001 From: Ben Swartzlander Date: Wed, 20 Mar 2013 11:38:08 -0700 Subject: [PATCH] Remove the log spam generated by the NetApp driver unit tests. Change-Id: Iae6a4f0a1553b4b461bd024c29ba6ff4e9db737f Fixes: bug #1157910 --- cinder/tests/test_netapp.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/cinder/tests/test_netapp.py b/cinder/tests/test_netapp.py index 1c250e573..9b7038cc1 100644 --- a/cinder/tests/test_netapp.py +++ b/cinder/tests/test_netapp.py @@ -604,7 +604,14 @@ def create_configuration(): return configuration -class FakeDfmServerHandler(BaseHTTPServer.BaseHTTPRequestHandler): +class FakeHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): + """HTTP handler that doesn't spam the log.""" + + def log_message(self, format, *args): + pass + + +class FakeDfmServerHandler(FakeHTTPRequestHandler): """HTTP handler that fakes enough stuff to allow the driver to run.""" def do_GET(s): @@ -1221,7 +1228,7 @@ CMODE_APIS = ['ProvisionLun', 'DestroyLun', 'CloneLun', 'MapLun', 'UnmapLun', 'ListLuns', 'GetLunTargetDetails'] -class FakeCMODEServerHandler(BaseHTTPServer.BaseHTTPRequestHandler): +class FakeCMODEServerHandler(FakeHTTPRequestHandler): """HTTP handler that fakes enough stuff to allow the driver to run""" def do_GET(s): @@ -1489,7 +1496,7 @@ RESPONSE_PREFIX_DIRECT = """ RESPONSE_SUFFIX_DIRECT = """""" -class FakeDirectCMODEServerHandler(BaseHTTPServer.BaseHTTPRequestHandler): +class FakeDirectCMODEServerHandler(FakeHTTPRequestHandler): """HTTP handler that fakes enough stuff to allow the driver to run""" def do_GET(s): @@ -1888,7 +1895,7 @@ class NetAppDirectCmodeISCSIDriverTestCase(NetAppCmodeISCSIDriverTestCase): self.driver.create_volume, self.vol_fail) -class FakeDirect7MODEServerHandler(BaseHTTPServer.BaseHTTPRequestHandler): +class FakeDirect7MODEServerHandler(FakeHTTPRequestHandler): """HTTP handler that fakes enough stuff to allow the driver to run""" def do_GET(s): -- 2.45.2