Flexibly test keystonmiddleware in placement stack
In change I524c93d30607ea6ab70de92ceea207ee77f34c25 keystonemiddleware adjusted how the value of the Keystone uri is quoted when sending a www-authenticate header. It went from using a single quote to double. Double is more correct. The existing version of the test changed in this commit relied on the single quote to verify that a URL set in config would be used by the middleware appropriately. Now, instead of one exact match test, two in-string tests are used. Change-Id: Ie9d1df419f2bdfa1d658f5f64ea9b7285de7b9b7 Closes-Bug: #1770718
This commit is contained in:
parent
1da469010f
commit
46d919c11b
@ -30,7 +30,6 @@ class DeployTest(test.NoDBTestCase):
|
||||
the keystone middleware correctly.
|
||||
"""
|
||||
auth_uri = 'http://example.com/identity'
|
||||
authenticate_header_value = "Keystone uri='%s'" % auth_uri
|
||||
self.flags(auth_uri=auth_uri, group='keystone_authtoken')
|
||||
# ensure that the auth_token middleware is chosen
|
||||
self.flags(auth_strategy='keystone', group='api')
|
||||
@ -39,5 +38,6 @@ class DeployTest(test.NoDBTestCase):
|
||||
|
||||
response = req.get_response(app)
|
||||
|
||||
self.assertEqual(authenticate_header_value,
|
||||
response.headers['www-authenticate'])
|
||||
auth_header = response.headers['www-authenticate']
|
||||
self.assertIn(auth_uri, auth_header)
|
||||
self.assertIn('keystone uri=', auth_header.lower())
|
||||
|
Loading…
x
Reference in New Issue
Block a user