Some postgresql test in test_migrations fail due to wrong column type

Bug #1262426 reported by Jay Bryant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Jay Bryant

Bug Description

It appears that, similar to mysql, there are a number of test cases that fail in test_migrations because the reported type of the column created differs from what is being checked for.

I am going to work on putting together a solution that works for ibm_db_sa, mysql and postgresql that figure out the right type of column based on the database engine being used.

Jay Bryant (jsbryant)
Changed in cinder:
importance: Undecided → Low
assignee: nobody → Jay Bryant (jsbryant)
Revision history for this message
John Griffith (john-griffith) wrote :

Hi Jay could you please add some info on how to reproduce this?

Revision history for this message
Jay Bryant (jsbryant) wrote :

John, it isn't hard to recreate. Here are the steps I am using on a system that has postgresql working:

1) Edit cinder/tests/test_migrations.conf
2) Uncomment the postgresql line and configure it for your system.
3) Run ./run_tests.sh -V cinder.tests.test_migrations

In the case of postgresql, any test cases that check for a column with sqlalchemy.types.DATETIME will fail as postgresql reports the column type as sqlalchemy.types.TIMESTAMP .

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/65170

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/65170
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=a9527de9ed3a2eae951564c3c74b7319113e8bf5
Submitter: Jenkins
Branch: master

commit a9527de9ed3a2eae951564c3c74b7319113e8bf5
Author: Jay S. Bryant <email address hidden>
Date: Mon Jan 6 16:32:00 2014 -0600

    Add time_type dictionary to test_migrations

    A number of postgresql migration tests fail because the test case
    is verifying that an sqlalchemy.types.DATETIME column was created.
    When the column type is checked, however, postgresql reports the type as
    sqlalchemy.types.TIMESTAMP. The mismatch causes numerous
    test cases to fail for postgresql.

    This creates a dictionary for each engine being tested to handle the
    different time types.

    Change-Id: Ic9921ff9fda001a66c0ea3a6a75c8adefa60b107
    Closes-bug: 1262426

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: icehouse-3 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.