Merge "Correct DB Interface migration test"

This commit is contained in:
Jenkins 2016-11-23 14:25:03 +00:00 committed by Gerrit Code Review
commit 12d4564f5f
1 changed files with 3 additions and 2 deletions

View File

@ -53,7 +53,6 @@ import sqlalchemy.exc
from ironic.common.i18n import _LE
from ironic.db.sqlalchemy import migration
from ironic.db.sqlalchemy import models
from ironic.drivers import base as base_driver
from ironic.tests import base
LOG = logging.getLogger(__name__)
@ -541,7 +540,9 @@ class MigrationCheckersMixin(object):
def _check_bcdd431ba0bf(self, engine, data):
nodes = db_utils.get_table(engine, 'nodes')
col_names = [column.name for column in nodes.c]
for iface in base_driver.ALL_INTERFACES:
added_ifaces = ['boot', 'console', 'deploy', 'inspect',
'management', 'power', 'raid', 'vendor']
for iface in added_ifaces:
name = '%s_interface' % iface
self.assertIn(name, col_names)
self.assertIsInstance(getattr(nodes.c, name).type,