Skip to content

Commit

Permalink
Fix running of migrations tests by Jenkins gate
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Roman Podolyaka committed Jul 29, 2013
1 parent 6f81fa2 commit 475f069
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cinder/tests/test_migrations.py
Expand Up @@ -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})

Expand All @@ -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()
Expand Down

0 comments on commit 475f069

Please sign in to comment.