Migration 201 isn't tested correctly

Bug #1226924 reported by Joshua Hesketh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Joshua Hesketh

Bug Description

In the migration tests instead of checking the new indexes are created against a table the indexes dictionary is overwritten causing the assertIn to only check against itself. EG:

         for table_name, indexes in data.iteritems():
             table = sqlalchemy.Table(table_name, meta, autoload=True)
            indexes = [(i.name, tuple(i.columns.keys()))
                       for i in table.indexes]

             for index in indexes:
                self.assertIn(index, indexes)

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

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

Changed in nova:
assignee: nobody → Joshua Hesketh (joshua.hesketh)
status: New → In Progress
David Ripton (dripton)
Changed in nova:
milestone: none → havana-rc1
importance: Undecided → High
tags: added: db
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/47075
Committed: http://github.com/openstack/nova/commit/34ccbc9ba638a1f72786a5317372c152aef948f8
Submitter: Jenkins
Branch: master

commit 34ccbc9ba638a1f72786a5317372c152aef948f8
Author: Joshua Hesketh <email address hidden>
Date: Wed Sep 18 13:38:10 2013 +1000

    Fix migration 201 tests to actually test changes

    Previously for migration 201 the indexes dictionary was overwritten
    causing the assertIn statement to tests against itself. This patch
    fixes it so that the test checks the new indexes are created
    correctly against the table and also checks they are removed on
    downgrade.

    Fixes bug 1226924

    Change-Id: Ie518041c6b7d534ed1b96e2f9b4e7206f4b68d87

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-rc1 → 2013.2
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.