Use known protocol scheme in keystone tests

With the recent introduction of the identity_uri in keystoneclient,
there is a small backward incompatible change which means that weird
protocols like the ones we use during tests aren't support properly
anymore. The patch replaces "foottp" and "barttp" by "file" hopefully
keeping testing coverage the same.

Change-Id: Idb30ff3ee0ca50911e453899ad32e630f9b18724
Closes-Bug: #1309092
This commit is contained in:
Thomas Herve 2014-04-17 19:45:19 +02:00
parent 1ed1a0ad22
commit e5b7606eaa
2 changed files with 8 additions and 8 deletions

View File

@ -37,17 +37,17 @@ class TestApp(test.BaseTestCase):
self.addCleanup(messaging.cleanup)
def test_keystone_middleware_conf(self):
self.CONF.set_override("auth_protocol", "foottp",
self.CONF.set_override("auth_protocol", "file",
group=acl.OPT_GROUP_NAME)
self.CONF.set_override("auth_version", "v2.0",
group=acl.OPT_GROUP_NAME)
self.CONF.set_override("auth_uri", None,
group=acl.OPT_GROUP_NAME)
api_app = app.make_app(self.CONF, attach_storage=False)
self.assertTrue(api_app.wsgi_app.auth_uri.startswith('foottp'))
self.assertTrue(api_app.wsgi_app.auth_uri.startswith('file'))
def test_keystone_middleware_parse_conffile(self):
content = "[{0}]\nauth_protocol = barttp"\
content = "[{0}]\nauth_protocol = file"\
"\nauth_version = v2.0".format(acl.OPT_GROUP_NAME)
tmpfile = fileutils.write_to_tempfile(content=content,
prefix='ceilometer',
@ -55,5 +55,5 @@ class TestApp(test.BaseTestCase):
service.prepare_service(['ceilometer-api',
'--config-file=%s' % tmpfile])
api_app = app.make_app(self.CONF, attach_storage=False)
self.assertTrue(api_app.wsgi_app.auth_uri.startswith('barttp'))
self.assertTrue(api_app.wsgi_app.auth_uri.startswith('file'))
os.unlink(tmpfile)

View File

@ -42,7 +42,7 @@ class TestApp(base.BaseTestCase):
self.CONF = self.useFixture(config.Config()).conf
def test_keystone_middleware_conf(self):
self.CONF.set_override("auth_protocol", "foottp",
self.CONF.set_override("auth_protocol", "file",
group=acl.OPT_GROUP_NAME)
self.CONF.set_override("auth_version", "v2.0",
group=acl.OPT_GROUP_NAME)
@ -52,7 +52,7 @@ class TestApp(base.BaseTestCase):
self.CONF.set_override("auth_uri", None, group=acl.OPT_GROUP_NAME)
api_app = app.setup_app()
self.assertTrue(api_app.auth_uri.startswith('foottp'))
self.assertTrue(api_app.auth_uri.startswith('file'))
def test_keystone_middleware_parse_conffile(self):
pipeline_conf = self.path_get("etc/ceilometer/pipeline.yaml")
@ -60,7 +60,7 @@ class TestApp(base.BaseTestCase):
"rpc_backend = fake\n"\
"pipeline_cfg_file = {0}\n"\
"[{1}]\n"\
"auth_protocol = barttp\n"\
"auth_protocol = file\n"\
"auth_version = v2.0\n".format(pipeline_conf,
acl.OPT_GROUP_NAME)
@ -71,7 +71,7 @@ class TestApp(base.BaseTestCase):
'--config-file=%s' % tmpfile])
self.CONF.set_override('connection', "log://", group="database")
api_app = app.setup_app()
self.assertTrue(api_app.auth_uri.startswith('barttp'))
self.assertTrue(api_app.auth_uri.startswith('file'))
os.unlink(tmpfile)