The glance.common.context.ContextMiddleware class, from which the KeystoneContextMiddleware class in glance_token inherits, expects a conference object of type glance.common.cfg.ConfigOpts. We are currently passing in a dict, which results in the following error when running the tests:
======================================================================
ERROR: test_200_good_token (keystone.test.client.test_middleware.TestGlanceMiddleware)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/stack/keystone/keystone/test/client/test_middleware.py", line 40, in setUp
(auth_token, glance_auth_token))
File "/opt/stack/keystone/keystone/test/functional/common.py", line 1546, in setUp
filter.filter_factory(settings)(self.test_middleware)
File "/opt/stack/keystone/keystone/middleware/glance_auth_token.py", line 76, in filter
return KeystoneContextMiddleware(app, conf)
File "/opt/stack/glance/glance/common/context.py", line 64, in __init__
self.conf.register_opts(self.opts)
AttributeError: 'dict' object has no attribute 'register_opts'
-------------------- >> begin captured stdout << ---------------------
Starting the Token Authentication component
--------------------- >> end captured stdout << ----------------------
-------------------- >> begin captured logging << --------------------
test.functional.common: DEBUG: Connecting to http://0.0.0.0:45229
test.functional.common: DEBUG: POST /v2.0/tokens returned 200
--------------------- >> end captured logging << ---------------------
Thanks for catching this Ed. Feel free to mark In Progress if you're in process of submitting a fix. :)