Fix test_version_discovery test
Something changed in requests/urllib3 library and now it sends requests with url in a lower-case. It affects test_version_discovery test because we use url in camel-case. This patch changes test url to lower-case to be compatible with old and new behaviours. Change-Id: I4ae9715b124adb0a2e0115c9b00ab16576665f72 Closes-Bug: #1643874
This commit is contained in:
@@ -247,7 +247,7 @@ def keystone_request_callback(request, context):
|
|||||||
context.headers["X-Subject-Token"] = token_id
|
context.headers["X-Subject-Token"] = token_id
|
||||||
context.status_code = 201
|
context.status_code = 201
|
||||||
return token_data
|
return token_data
|
||||||
elif "WrongDiscoveryResponse.discovery.com" in request.url:
|
elif "wrongdiscoveryresponse.discovery.com" in request.url:
|
||||||
return str(WRONG_VERSION_RESPONSE)
|
return str(WRONG_VERSION_RESPONSE)
|
||||||
else:
|
else:
|
||||||
context.status_code = 500
|
context.status_code = 500
|
||||||
|
@@ -108,7 +108,7 @@ class ShellTest(utils.TestCase):
|
|||||||
_shell = shell.OpenStackCinderShell()
|
_shell = shell.OpenStackCinderShell()
|
||||||
sess = session.Session()
|
sess = session.Session()
|
||||||
|
|
||||||
os_auth_url = "https://WrongDiscoveryResponse.discovery.com:35357/v2.0"
|
os_auth_url = "https://wrongdiscoveryresponse.discovery.com:35357/v2.0"
|
||||||
self.register_keystone_auth_fixture(mocker, os_auth_url)
|
self.register_keystone_auth_fixture(mocker, os_auth_url)
|
||||||
|
|
||||||
self.assertRaises(DiscoveryFailure,
|
self.assertRaises(DiscoveryFailure,
|
||||||
|
Reference in New Issue
Block a user