From 0d8f2696bd7911939f28bcf064d03ef79d0be726 Mon Sep 17 00:00:00 2001 From: Rushi Agrawal Date: Thu, 11 Apr 2013 19:31:37 +0530 Subject: [PATCH] NetApp: Fix failing NetApp tests The tests were failing due to an upgrade in the testing framework (possibly due to upgrade of nose package from 1.2.1 to 1.3.0). The actual reason was a bug in the suds client. A simple workaround is utilised here, which sets the logging level of a suds file to INFO instead of DEBUG. Some 'FutureWarning' warnings from the test output were also fixed. Change-Id: Ia67476c23bffa91264cf79f6a26944b450c4f4fc --- cinder/tests/test_netapp.py | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/cinder/tests/test_netapp.py b/cinder/tests/test_netapp.py index c192ee2de..c5e573881 100644 --- a/cinder/tests/test_netapp.py +++ b/cinder/tests/test_netapp.py @@ -21,6 +21,7 @@ Tests for NetApp volume driver import BaseHTTPServer import httplib +import logging as generic_logging import shutil import StringIO import tempfile @@ -37,6 +38,14 @@ from cinder.volume.drivers.netapp.iscsi import netapp_opts LOG = logging.getLogger("cinder.volume.driver") +#NOTE(rushiagr): A bug in Suds package +# (https://fedorahosted.org/suds/ticket/359) causes nasty errors +# with tests while using debug-level logging. Unfortunately, +# the maintainers of the package stopped tending to any patch +# requests almost two years back. So setting the logging level to +# INFO here seems the only plausible workaround. +generic_logging.getLogger('suds.mx.core').setLevel(generic_logging.INFO) + WSDL_HEADER = """