summaryrefslogtreecommitdiffstats
path: root/nova/exception.py
diff options
context:
space:
mode:
authorSean Dague <sdague@linux.vnet.ibm.com>2013-01-28 17:51:10 -0500
committerSean Dague <sdague@linux.vnet.ibm.com>2013-01-28 23:22:26 -0500
commit3c64e6ca4cfe4e61348ef1438787fb61d04d5ec7 (patch)
tree28cca2f4b0a4fa2e6843dc6085dce8053f4ddd23 /nova/exception.py
parentf5a5ba84757a85836d78cc3d8a4f62f5ada2ac65 (diff)
downloadnova-3c64e6ca4cfe4e61348ef1438787fb61d04d5ec7.tar.gz
nova-3c64e6ca4cfe4e61348ef1438787fb61d04d5ec7.tar.xz
nova-3c64e6ca4cfe4e61348ef1438787fb61d04d5ec7.zip
refactored data upgrade tests in test_migrations
The one off testing in test_migrations was starting to get obtuse enough that it was possible for bugs to slip through (which they did already). Create a more general framework for testing data transitions at any db migration. Hook the walk_versions code so as we are about to upgrade to a migration point, attempt to run a _prerun_### function, then follow it up with a _check_### function afterwards. Create some utility functions to make doing things in these _prerun and _check functions pretty concise. This makes these checks db independent, and has it so they'll run however we are running the walk_versions. In doing so, this uncovered a bug in the 147 migration, which is fixed inline. There is no retroactive fix, as 147 was destructive to data, so would have nuked anyone that hit it already. Updated to remove safe_getattr, thanks to jerdfelt for pointer on doing that right. Partially implements blueprint migration-testing-with-data Fixes bug #1108448 Change-Id: I8bd92e3688109bfbdf1da21a175055b7263abf45
Diffstat (limited to 'nova/exception.py')
0 files changed, 0 insertions, 0 deletions