Revert "Enable debug logging in unit tests"

This reverts commit 94565e7097.

Apparently the extra overhead of converting the testr storage format to subunit doubles the size of the file, placing in on the borderline of the gate's 50MB limit, which is inexplicably applied to the uncompressed data (this change added only ~200kB to the size of the gzipped subunit file afaict).

Change-Id: Ic458be0fa273c1ba94dacb9a5233220ccc7c606d
This commit is contained in:
Zane Bitter 2017-02-06 16:02:27 +00:00
parent 94565e7097
commit 03b4fd60e4
1 changed files with 4 additions and 4 deletions

View File

@ -46,16 +46,16 @@ TEST_DEFAULT_LOGLEVELS = {'migrate': logging.WARN,
'sqlalchemy': logging.WARN,
'heat.engine.environment': logging.ERROR}
_LOG_FORMAT = "%(levelname)8s [%(name)s] %(message)s"
_FALSE_VALUES = {'False', 'false', '0', 'no'}
_TRUE_VALUES = ('True', 'true', '1', 'yes')
class FakeLogMixin(object):
def setup_logging(self, quieten=True):
# Assign default logs to self.LOG so we can still
# assert on heat logs.
default_level = logging.DEBUG
if os.environ.get('OS_DEBUG') in _FALSE_VALUES:
default_level = logging.INFO
default_level = logging.INFO
if os.environ.get('OS_DEBUG') in _TRUE_VALUES:
default_level = logging.DEBUG
self.LOG = self.useFixture(
fixtures.FakeLogger(level=default_level, format=_LOG_FORMAT))