Migration 227 doesn't run tests against sqlite despite modifying it.

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

Bug Description

Currently the check for migration 227 looks like:

    def _check_227(self, engine, data):
        if engine.name == 'sqlite':
            return

Despite the migration affecting sqlite. The check also assumes a row exists in 'project_user_quotas' with id=4 to test against. This is inserted in _check_203 but when snake walking the migrations the row is dropped again and not reinserted (as checks aren't re-run after snake walking).

The check should not assume any data already exists and insert any test data it should need in _pre_upgrade_227.

Tags: db
Revision history for this message
Joshua Hesketh (joshua.hesketh) wrote :

The actual check for id=4 to exist actually has nothing to do with the migration so it can be removed safely.

Changed in nova:
assignee: nobody → Joshua Hesketh (joshua.hesketh)
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/52261

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

Reviewed: https://review.openstack.org/52261
Committed: http://github.com/openstack/nova/commit/1c55232ea33d59820b31bde4d318c05a04f430af
Submitter: Jenkins
Branch: master

commit 1c55232ea33d59820b31bde4d318c05a04f430af
Author: Joshua Hesketh <email address hidden>
Date: Thu Oct 17 11:52:21 2013 +1100

    Fix tests for migration 227 to check sqlite

    The _check_227 test skips for sqlite despite modifying that dialect.
    It also has a redundant check for an existing row that doesn't work
    when snake-walking the migration tests.

    Change-Id: I58d9a539868d50e345a6dfa78918e04a4a699a68
    Closes-Bug: 1240751

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