[nailgun] Add tests to cover database migrations

Bug #1391553 reported by Ihor Kalnytskyi
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Fuel Python (Deprecated)

Bug Description

One more time we have struck against of migration issue:

    https://bugs.launchpad.net/fuel/+bug/1391525

So we MUST cover all migrations with unit tests and we need to have some util stuff to do that.

Revision history for this message
Evgeniy L (rustyrobot) wrote :

We should figure out how it should be done.
I think for each version we should have fixtures, like here [1], but it doesn't cover our cases, because this nodes are node deployed as result there is not enough data.
Any ideas?

[1] https://github.com/stackforge/fuel-web/blob/master/nailgun/nailgun/fixtures/sample_environment.json

Changed in fuel:
status: New → Confirmed
Nikolay Markov (nmarkov)
Changed in fuel:
status: Confirmed → Triaged
Revision history for this message
Ihor Kalnytskyi (ikalnytskyi) wrote :

We already have some skeleton for doing this - https://github.com/stackforge/fuel-web/blob/7b4350afb2a13eba11c710aa30e6441ec2993fd5/nailgun/nailgun/test/unit/test_migration_fuel_6_1.py#L23-L191

Perhaps it's not optimal, but it works. We should write more tests for fuel_6_1.py migration.

Dmitry Pyzhov (dpyzhov)
tags: added: tech-debt
removed: nailgun
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
importance: High → Medium
milestone: 6.1 → 7.0
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 7.0 → 8.0
Revision history for this message
Ihor Kalnytskyi (ikalnytskyi) wrote :

Mark it fixed since our migrations for 6.1 and 7.0 are covered, and it makes no sense to introduce them for old releases because we don't change them.

Changed in fuel:
status: Triaged → Fix Committed
Dmitry Pyzhov (dpyzhov)
tags: added: area-python
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/327063
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=55c095b20b3296de5129bd9a6eb076201f2a6dc4
Submitter: Jenkins
Branch: master

commit 55c095b20b3296de5129bd9a6eb076201f2a6dc4
Author: Nikita Zubkov <email address hidden>
Date: Wed Jun 8 15:31:43 2016 +0300

    Add downgrade migration tests

    Change-Id: Idc79102273d93cd38bc1282aa003ece00ac88d63
    Partial-Bug: #1391553

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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