]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove unit test migration logging
authorSean McGinnis <sean_mcginnis@dell.com>
Thu, 6 Aug 2015 21:46:27 +0000 (16:46 -0500)
committerSean McGinnis <sean_mcginnis@dell.com>
Thu, 6 Aug 2015 21:46:27 +0000 (16:46 -0500)
DB migration unit tests output a bunch of 'Loading script'
messages that are of little to no value. This patch raises
the default migrations module logging level to WARNING to
prevent these debug messages from cluttering the output.

Change-Id: Ib1bb5a0efc791a41f2d4cb1ea0e6eba4658097a8
Co-Authored-By: John Griffith <john.griffith@solidfire.com>
cinder/test.py

index c8433d1262a661ceeb9be40f578b100ba1283a65..d0601802a2bc89e564e6e60e35034255f86e2d43 100644 (file)
@@ -73,6 +73,10 @@ class Database(fixtures.Fixture):
         self.sqlite_db = sqlite_db
         self.sqlite_clean_db = sqlite_clean_db
 
+        # Suppress logging for test runs
+        migrate_logger = logging.getLogger('migrate')
+        migrate_logger.setLevel(logging.WARNING)
+
         self.engine = db_api.get_engine()
         self.engine.dispose()
         conn = self.engine.connect()