]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix test isolation issues related to versions
authorGorka Eguileor <geguileo@redhat.com>
Wed, 2 Mar 2016 12:23:31 +0000 (13:23 +0100)
committerGorka Eguileor <geguileo@redhat.com>
Wed, 2 Mar 2016 14:16:22 +0000 (15:16 +0100)
commitfc2e0f454da174eb56d54350a920c211542d0d6d
tree3d700e798a831492ca94c8a9946f77698991daa9
parent4504fdfa756c094164764ce9d614ef72b34cb389
Fix test isolation issues related to versions

In cinder.rpc.RPCAPI methods _determine_rpc_version_cap and
_determine_obj_version_cap use global variables LAST_RPC_VERSIONS and
LAST_OBJ_VERSIONS to cache version values so we need to clear these
values between tests so one test values don't get passed to the next
test.

This was problematic for example when running some
cinder.tests.unit.api.contrib tests in a specific order:

- test_admin_actions.AdminActionsTest.test_delete_backup_force_when_creating
- test_backups.BackupsAPITestCase.test_create_backup_snapshot_json

Change-Id: I073557a6e0a17a3e00fd32d48d389a3bcf42e341
cinder/test.py