Merge "Conductor version cannot be null in Rocky"

This commit is contained in:
Zuul 2018-02-19 17:17:38 +00:00 committed by Gerrit Code Review
commit 4ace8342ad
2 changed files with 0 additions and 18 deletions

View File

@ -1186,17 +1186,6 @@ class Connection(api.Connection):
if not supported_versions:
continue
# TODO(rloo). Because we forgot to set the version of
# conductors in Pike, we allow the Conductor version to
# be null now (Queens). In Rocky, it cannot be null,
# and this 'if...' can be deleted then.
if model.__name__ == 'Conductor':
query = model_query(model.version).filter(
model.version.notin_(supported_versions))
if query.count():
return False
continue
# NOTE(rloo): we use model.version, not model, because we
# know that the object has a 'version' column
# but we don't know whether the entire object is

View File

@ -60,13 +60,6 @@ class UpgradingTestCase(base.DbTestCase):
self.assertEqual(v, conductor.version)
self.assertTrue(self.dbapi.check_versions())
def test_check_versions_conductor_no_version(self):
# works in Queens only
conductor = utils.create_test_conductor(version=None)
conductor = self.dbapi.get_conductor(conductor.hostname)
self.assertIsNone(conductor.version)
self.assertTrue(self.dbapi.check_versions())
def test_check_versions_conductor_old(self):
conductor = utils.create_test_conductor(version='1.0')
conductor = self.dbapi.get_conductor(conductor.hostname)