Fixed the blocking unittest issues.
1. Fixed the bug #1153921 introduced by the nova changeset https://github.com/openstack/nova/commit/bd5a9b87. 2. Adapted to the latest keystoneclient middleware change introduced by https://github.com/openstack/python-keystoneclient/commit/d782a998. We must explicit set auth_version to prevent the middleware to automatically detect its api version from remote keystone server in unittest. Change-Id: I439a74a7f9a8a62369ae50dc1d5e50e20f4d3574
This commit is contained in:
@@ -36,6 +36,7 @@ class TestApp(unittest.TestCase):
|
||||
def test_keystone_middleware_conf(self):
|
||||
cfg.CONF.set_override("auth_protocol", "foottp",
|
||||
group=acl.OPT_GROUP_NAME)
|
||||
cfg.CONF.set_override("auth_version", "v2.0", group=acl.OPT_GROUP_NAME)
|
||||
api_app = app.setup_app()
|
||||
self.assertEqual(api_app.auth_protocol, 'foottp')
|
||||
|
||||
@@ -43,6 +44,7 @@ class TestApp(unittest.TestCase):
|
||||
tmpfile = tempfile.mktemp()
|
||||
with open(tmpfile, "w") as f:
|
||||
f.write("[%s]\nauth_protocol = barttp" % acl.OPT_GROUP_NAME)
|
||||
f.write("\nauth_version = v2.0")
|
||||
service.prepare_service(['ceilometer-api',
|
||||
'--config-file=%s' % tmpfile])
|
||||
api_app = app.setup_app()
|
||||
|
||||
Reference in New Issue
Block a user