diff options
| author | Clark Boylan <clark.boylan@gmail.com> | 2012-12-06 13:16:14 -0800 |
|---|---|---|
| committer | Clark Boylan <clark.boylan@gmail.com> | 2012-12-06 13:16:14 -0800 |
| commit | f495b95d0ee28141bd067ca64a0176189f5d8293 (patch) | |
| tree | 201a52a4e777e2af56e8a25d3881c4bb6b43a274 /bin | |
| parent | 92a14591ff2d34959e0b96779d8e89f93f441c97 (diff) | |
| download | nova-f495b95d0ee28141bd067ca64a0176189f5d8293.tar.gz nova-f495b95d0ee28141bd067ca64a0176189f5d8293.tar.xz nova-f495b95d0ee28141bd067ca64a0176189f5d8293.zip | |
Fix bugs in test_migrations.py
This fixes two related issues in nova/tests/test_migrations.py.
First, the snake_walk flag was only set to True for the first test run
out of TestMigrations. setUp() always set snake_walk to False initially
then would only update the value if TEST_DATABASES was empty.
TEST_DATABASES was only empty during the setUp() of the first test.
Fix this by resetting test_databases before each test.
Second, because snake_walk was always False when test_walk_versions
performing the snake walk version of the database migrations was never
tested and broken. When downgrading from version X to version X -1 of a
database version X must be passed to the migration tool as version X
contains the downgrade path for that particular version. Set the correct
versions when snake walking the DB migrations.
Part of blueprint grizzly-testtools
Change-Id: I8d4d9ee8efe46b4690dd6cbe95879e88aaeb0b5a
Diffstat (limited to 'bin')
0 files changed, 0 insertions, 0 deletions
