I have found that this test is failing if I create a config file which points at at a real swift system and specify the config file in the GLANCE_TEST_SWIFT_CONF:
GLANCE_TEST_SWIFT_CONF=./glance-api.conf ./run_tests.sh
There are several problems; the first is that the creds in the uri are not properly quoted so the test finds an incorrect number of colons in the uri. Also, the get_swift_uri() function only fixes up uris of the form '@http://' and does not handle uris of the form '@https://'. Finally, when the test attempts to GET the image it just created this fails because the image is not yet in the 'active' state but in the 'queued' state.
glance.tests.functional.v1.test_copy_to_file.TestCopyToFile.test_copy_from_swift ... FAIL
======================================================================
FAIL: glance.tests.functional.v1.test_copy_to_file.TestCopyToFile.test_copy_from_swift
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
File "/home/jenkins/QA_Automated_Tests_DEVQA2_master/workspace/DevQA_Glance_RnDA_Functional_Tests/glance/tests/utils.py", line 87, in _runner
func(*args, **kw)
File "/home/jenkins/QA_Automated_Tests_DEVQA2_master/workspace/DevQA_Glance_RnDA_Functional_Tests/glance/tests/utils.py", line 123, in wrapped
func(*a, **kwargs)
File "/home/jenkins/QA_Automated_Tests_DEVQA2_master/workspace/DevQA_Glance_RnDA_Functional_Tests/glance/tests/functional/v1/test_copy_to_file.py", line 167, in test_copy_from_swift
self._do_test_copy_from('swift', get_swift_uri)
File "/home/jenkins/QA_Automated_Tests_DEVQA2_master/workspace/DevQA_Glance_RnDA_Functional_Tests/glance/tests/functional/v1/test_copy_to_file.py", line 110, in _do_test_copy_from
self.assertEqual(response.status, 201, content)
MismatchError: 500 != 201: Traceback (most recent call last):
File "/home/jenkins/QA_Automated_Tests_DEVQA2_master/workspace/DevQA_Glance_RnDA_Functional_Tests/.venv/local/lib/python2.7/site-packages/eventlet/wsgi.py", line 383, in handle_one_response
result = self.application(self.environ, start_response)
.
.
.
File "/home/jenkins/QA_Automated_Tests_DEVQA2_master/workspace/DevQA_Glance_RnDA_Functional_Tests/glance/store/__init__.py", line 250, in get_store_from_location
loc = location.get_location_from_uri(uri)
File "/home/jenkins/QA_Automated_Tests_DEVQA2_master/workspace/DevQA_Glance_RnDA_Functional_Tests/glance/store/location.py", line 75, in get_location_from_uri
store_location_class=scheme_info['location_class'])
File "/home/jenkins/QA_Automated_Tests_DEVQA2_master/workspace/DevQA_Glance_RnDA_Functional_Tests/glance/store/location.py", line 115, in __init__
self.store_location.parse_uri(uri)
File "/home/jenkins/QA_Automated_Tests_DEVQA2_master/workspace/DevQA_Glance_RnDA_Functional_Tests/glance/store/swift.py", line 141, in parse_uri
raise exception.BadStoreUri(message=reason)
BadStoreUri: URI cannot contain more than one occurrence of a scheme. If you have specified a URI like swift://user:pass@http://authurl.com/v1/container/obj, you need to change it to use the swift+http:// scheme, like so: swift+http://user:<email address hidden>/v1/container/obj
Fix proposed to branch: master /review. openstack. org/25126
Review: https:/