Migrations tests aren't run for MySQL and PostgreSQL by Jenkins gate
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
Ivan Kolodyazhny |
Bug Description
Database schema migrations tests aren't run for MySQL and PostgreSQL backends by Jenkins gate. This is due to the bug in _get_connect_
def _get_connect_
"""
Try to get a connection with a very specific set of values, if we get
these then we'll run the tests, otherwise they are skipped
"""
if backend == "postgres":
backend = "postgresql+
return ("%(backend)
This function is supposed to return a database connection string, but % operator is missed, so a tuple will be returned instead. The return value is used in _is_backend_avail() function:
def _is_backend_
try:
if backend == "mysql":
elif backend == "postgres":
engine = sqlalchemy.
connection = engine.connect()
except Exception:
# intentionally catch all to handle exceptions even if we don't
# have any backend code loaded.
return False
else:
return True
_is_backend_avail() excepts a too general exception, so the actual error is interpreted incorrectly (as if a DB backend wasn't available), so the test is skipped.
The regression was introduced in 729a08a019837bf
Changed in cinder: | |
assignee: | nobody → Roman Podolyaka (rpodolyaka) |
Changed in cinder: | |
milestone: | none → havana-3 |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | havana-3 → 2013.2 |
Changed in cinder: | |
status: | Fix Released → Confirmed |
Fix proposed to branch: master /review. openstack. org/38826
Review: https:/