]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix cinder objects unit test registration
authorMatt Riedemann <mriedem@us.ibm.com>
Tue, 10 Nov 2015 23:45:29 +0000 (15:45 -0800)
committerMatt Riedemann <mriedem@us.ibm.com>
Wed, 11 Nov 2015 21:06:36 +0000 (13:06 -0800)
commit0e68cf94dd3302da4efe6e6b420629dd65ba229a
tree559567f1ae3183adfdfea1470f19303e2d12a86d
parentaf2fb820fe3ca0bc8c9c35153fa7868fa1ea866e
Fix cinder objects unit test registration

The base test case was extending test code from oslo_versionedobjects
which is bad because (1) it was adding test objects from the o.vo
registry into the cinder object registry and (2) it was extending
internal private test classes from o.vo which are subject to change and
would break cinder.

This cleans up the base test case and object registration to basically
do it the same way that nova does.

It also moves the duplicate _compare() method into the base class and
fixes a bug where db obj fields that were lists were compared
incorrectly against object lists.

This will allow us to verify object version hashes using o.vo's
ObjectVersionChecker fixture in a follow on change without the
extraneous object registrations from o.vo messing with the results.

Partial-Bug: #1514926

Change-Id: Ie34675e378951cda9aa218f3181dc86767717450
cinder/test.py
cinder/tests/unit/__init__.py
cinder/tests/unit/objects/__init__.py
cinder/tests/unit/objects/test_backup.py
cinder/tests/unit/objects/test_cgsnapshot.py
cinder/tests/unit/objects/test_consistencygroup.py
cinder/tests/unit/objects/test_service.py
cinder/tests/unit/objects/test_snapshot.py
cinder/tests/unit/objects/test_volume.py
cinder/tests/unit/objects/test_volume_attachment.py
cinder/tests/unit/objects/test_volume_type.py