Permalink
Browse files

Merge "Auto-detect max SQL migration"

  • Loading branch information...
Jenkins authored and openstack-gerrit committed Jan 16, 2013
2 parents a96ab06 + 52da32c commit 55c76ef5b417f179791d5713380208c7650dfce7
Showing with 4 additions and 1 deletion.
  1. +4 −1 tests/test_sql_upgrade.py
@@ -53,6 +53,9 @@ def setUp(self):
self.schema = versioning_api.ControlledSchema.create(self.engine,
self.repo_path, 0)
+ # auto-detect the highest available schema version in the migrate_repo
+ self.max_version = self.schema.repository.version().version
+
def tearDown(self):
super(SqlUpgradeTests, self).tearDown()
@@ -270,7 +273,7 @@ def insert_dict(self, session, table_name, d):
', '.join("'%s'" % v for v in d.values())))
def test_downgrade_to_0(self):
- self.upgrade(13)
+ self.upgrade(self.max_version)
self.downgrade(0)
for table_name in ["user", "token", "role", "user_tenant_membership",
"metadata"]:

0 comments on commit 55c76ef

Please sign in to comment.