]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Mock wait_for_volume_removal in test_brick_connector
authorJay S. Bryant <jsbryant@us.ibm.com>
Fri, 3 Apr 2015 19:19:28 +0000 (14:19 -0500)
committerJay S. Bryant <jsbryant@us.ibm.com>
Fri, 3 Apr 2015 19:27:33 +0000 (14:27 -0500)
commit62191c866a4e5117e47f4aece72fe5fc7bc520e5
tree65d92077156cf161ea8d8cbc19a37fdc9cbc95f3
parent7ba197ae285b20b6a62365f3374f265a2dbbeff6
Mock wait_for_volume_removal in test_brick_connector

Systems where /dev/disk/by-path did exist were failing unit
test for test_connect_volume, test_connect_volume_with_alternative_targets
and test_connect_volume_with_alternative_targets_primary_error in
cinder.tests.test_brick_connector .  The problem was that the test
cases were mocking out os.path to return exists.  This resulted in
the new code from commit 43029941219505bc3861dd285e3393e08c76b433
never being able to exit the wait_for_volume_removal loop.

To avoid this problem I am mocking out wait_for_volume_removal for these
test cases.  wait_for_volume_removal is tested elsewhere and not relevant
for these test cases.

Change-Id: Ib7f75c852f9c79f261e319be0c1e3fd21acab8f1
Closes-bug: 1440153
cinder/tests/brick/test_brick_connector.py