Add a constraint to skip fields during model and db sync tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.db |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
We would like to drop a few columns from the Models class and subsequently identify these fields for a database removal in the next openstack ('M') release.
However In nova/tests/
We would like to have a 'whitelist' of attributes that are identified for cleanups from the models.py that could act as a constraint while doing this models_sync test. The attributes could be called "allow_
The test failure could be observed on this review: https:/
Changed in oslo.db: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
Here's the error trace for the UT that fails:
2015-06-24 18:29:04.042 | jenkins/ workspace/ gate-nova- python27/ .tox/py27/ local/lib/ python2. 7/site- packages/ oslo_db/ sqlalchemy/ test_migrations .py", line 588, in test_models_sync jenkins/ workspace/ gate-nova- python27/ .tox/py27/ local/lib/ python2. 7/site- packages/ unittest2/ case.py" , line 666, in fail eption( msg) 'scheduled_ at', DATETIME(), table=< instances> ))]
2015-06-24 18:29:04.042 | Captured traceback:
2015-06-24 18:29:04.042 | ~~~~~~~~~~~~~~~~~~~
2015-06-24 18:29:04.042 | Traceback (most recent call last):
2015-06-24 18:29:04.042 | File "/home/
2015-06-24 18:29:04.042 | "Models and migration scripts aren't in sync:\n%s" % msg)
2015-06-24 18:29:04.042 | File "/home/
2015-06-24 18:29:04.042 | raise self.failureExc
2015-06-24 18:29:04.042 | AssertionError: Models and migration scripts aren't in sync:
2015-06-24 18:29:04.042 | [ ( 'remove_column',
2015-06-24 18:29:04.043 | None,
2015-06-24 18:29:04.043 | 'instances',
2015-06-24 18:29:04.043 | Column(
2015-06-24 18:29:04.043 |