From 2c0065ff86f81bd9c9f9d455ca10ad46e2aed73d Mon Sep 17 00:00:00 2001 From: Rick Harris Date: Wed, 27 Feb 2013 22:50:24 +0000 Subject: Actually run baremetal migration tests. The baremetal migration tests weren't being run because the test lookup code was looking for a tests of form 'check_#' instead of 'check_###'. Change-Id: I8f162d6493dd09b2d0cff36c40ae9acc5df1269c --- nova/tests/test_migrations.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nova/tests/test_migrations.py b/nova/tests/test_migrations.py index 60efcf34f..e090044cc 100644 --- a/nova/tests/test_migrations.py +++ b/nova/tests/test_migrations.py @@ -401,7 +401,7 @@ class BaseMigrationTestCase(test.TestCase): # version). So if we have any downgrade checks, they need to be run for # the previous (higher numbered) migration. post_downgrade = getattr( - self, "_post_downgrade_%d" % (version + 1), None) + self, "_post_downgrade_%03d" % (version + 1), None) if post_downgrade: post_downgrade(engine) @@ -417,7 +417,8 @@ class BaseMigrationTestCase(test.TestCase): try: if with_data: data = None - pre_upgrade = getattr(self, "_pre_upgrade_%d" % version, None) + pre_upgrade = getattr( + self, "_pre_upgrade_%03d" % version, None) if pre_upgrade: data = pre_upgrade(engine) @@ -430,7 +431,7 @@ class BaseMigrationTestCase(test.TestCase): self.REPOSITORY)) if with_data: - check = getattr(self, "_check_%d" % version, None) + check = getattr(self, "_check_%03d" % version, None) if check: check(engine, data) except Exception: -- cgit