From 475f06909388a974c9dd52b8d9d1f856f81a1155 Mon Sep 17 00:00:00 2001 From: Roman Podolyaka Date: Fri, 26 Jul 2013 18:44:19 +0300 Subject: [PATCH] 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 --- cinder/tests/test_migrations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() -- 2.45.2