]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove the log spam generated by the NetApp driver unit tests.
authorBen Swartzlander <bswartz@netapp.com>
Wed, 20 Mar 2013 18:38:08 +0000 (11:38 -0700)
committerBen Swartzlander <bswartz@netapp.com>
Wed, 20 Mar 2013 18:38:08 +0000 (11:38 -0700)
Change-Id: Iae6a4f0a1553b4b461bd024c29ba6ff4e9db737f
Fixes: bug #1157910
cinder/tests/test_netapp.py

index 1c250e573d985b6c118719330776971e594bcfb8..9b7038cc131c8afb75edf6c096e54daf2ba04e12 100644 (file)
@@ -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 = """</netapp>"""
 
 
-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):