I've been seeing these intermittently. They don't seem to happen in a fresh environment, but happen mostly in py27 on test re-runs:
======================================================================
FAIL: glanceclient.tests.unit.v2.test_shell_v2.ShellV2Test.test_do_image_download_with_500
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/stack/python-glanceclient/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
return func(*args, **keywargs)
File "glanceclient/tests/unit/v2/test_shell_v2.py", line 791, in test_do_image_download_with_500
self.assertEqual(1, mocked_data.call_count)
File "/opt/stack/python-glanceclient/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual
self.assertThat(observed, matcher, message)
File "/opt/stack/python-glanceclient/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: 1 != 0
======================================================================
FAIL: glanceclient.tests.unit.v2.test_shell_v2.ShellV2Test.test_do_image_download_with_forbidden_id
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/stack/python-glanceclient/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
return func(*args, **keywargs)
File "glanceclient/tests/unit/v2/test_shell_v2.py", line 776, in test_do_image_download_with_forbidden_id
self.assertEqual(1, mocked_data.call_count)
File "/opt/stack/python-glanceclient/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual
self.assertThat(observed, matcher, message)
File "/opt/stack/python-glanceclient/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: 1 != 0
I think the problem is Change-Id: I841bebeda38814235079429eca0b1e5fd2f04dae , which moved the check to make sure there was someplace specified to put the data to the beginning of the do_image_download function. Fix is to modify the two tests so that they will make it past the data check and then encounter the 500 or 403 and test to make sure the error is handled correctly.
Fix proposed to branch: master /review. openstack. org/557834
Review: https:/