From: Roman Podolyaka Date: Fri, 26 Jul 2013 15:44:19 +0000 (+0300) Subject: Fix running of migrations tests by Jenkins gate X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=475f06909388a974c9dd52b8d9d1f856f81a1155;p=openstack-build%2Fcinder-build.git Fix running of migrations tests by Jenkins gate DB schema migrations tests are always skipped for MySQL and PostgreSQL backends, when running gate jobs. This is due to the bug in the function, which checks, if given DB backend is available. Fixes bug 1205386 Change-Id: I80d5da64347279b8fb5a975ff0d11f31fe35c6ce --- diff --git a/cinder/tests/test_migrations.py b/cinder/tests/test_migrations.py index 3076b1c5b..306cd6927 100644 --- a/cinder/tests/test_migrations.py +++ b/cinder/tests/test_migrations.py @@ -54,7 +54,7 @@ def _get_connect_string(backend, if backend == "postgres": backend = "postgresql+psycopg2" - return ("%(backend)s://%(user)s:%(passwd)s@localhost/%(database)s", + return ("%(backend)s://%(user)s:%(passwd)s@localhost/%(database)s" % {'backend': backend, 'user': user, 'passwd': passwd, 'database': database}) @@ -79,6 +79,7 @@ def _is_backend_avail(backend, except Exception: # intentionally catch all to handle exceptions even if we don't # have any backend code loaded. + LOG.exception("Backend %s is not available", backend) return False else: connection.close()