summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEoghan Glynn <eglynn@redhat.com>2014-04-19 10:11:20 +0100
committerEoghan Glynn <eglynn@redhat.com>2014-04-19 10:11:20 +0100
commit5fc3f27b06b69b630c5e39d67c71a7a13aca2e79 (patch)
treeca541598df8f1630a1176bafa098cc35cac18981
parentedfe25845dd3db9f0a07c3780d4160a20e62db3a (diff)
downloadceilometer-5fc3f27b06b69b630c5e39d67c71a7a13aca2e79.tar.gz
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 (cherry picked from commit e5b7606eaa94033256eb1aca5f6a6eed4f9e54a0) (cherry picked from commit a1ec218d683e27434a5b085f1fbc7e3c13b60684)
-rw-r--r--tests/api/v1/test_app.py8
-rw-r--r--tests/api/v2/test_app.py8
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/api/v1/test_app.py b/tests/api/v1/test_app.py
index 89368bc8..1a257c5a 100644
--- a/tests/api/v1/test_app.py
+++ b/tests/api/v1/test_app.py
@@ -34,21 +34,21 @@ class TestApp(base.TestCase):
cfg.CONF.reset()
def test_keystone_middleware_conf(self):
- cfg.CONF.set_override("auth_protocol", "foottp",
+ cfg.CONF.set_override("auth_protocol", "file",
group=acl.OPT_GROUP_NAME)
cfg.CONF.set_override("auth_version", "v2.0", group=acl.OPT_GROUP_NAME)
cfg.CONF.set_override("auth_uri", None,
group=acl.OPT_GROUP_NAME)
api_app = app.make_app(cfg.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):
tmpfile = self.temp_config_file_path()
with open(tmpfile, "w") as f:
- f.write("[%s]\nauth_protocol = barttp" % acl.OPT_GROUP_NAME)
+ f.write("[%s]\nauth_protocol = file" % acl.OPT_GROUP_NAME)
f.write("\nauth_version = v2.0")
service.prepare_service(['ceilometer-api',
'--config-file=%s' % tmpfile])
api_app = app.make_app(cfg.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)
diff --git a/tests/api/v2/test_app.py b/tests/api/v2/test_app.py
index e2b4a78a..a7c930c2 100644
--- a/tests/api/v2/test_app.py
+++ b/tests/api/v2/test_app.py
@@ -41,7 +41,7 @@ class TestApp(base.TestCase):
cfg.CONF.reset()
def test_keystone_middleware_conf(self):
- cfg.CONF.set_override("auth_protocol", "foottp",
+ cfg.CONF.set_override("auth_protocol", "file",
group=acl.OPT_GROUP_NAME)
cfg.CONF.set_override("auth_version", "v2.0", group=acl.OPT_GROUP_NAME)
cfg.CONF.set_override("pipeline_cfg_file",
@@ -50,7 +50,7 @@ class TestApp(base.TestCase):
cfg.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):
tmpfile = self.temp_config_file_path()
@@ -59,13 +59,13 @@ class TestApp(base.TestCase):
f.write("pipeline_cfg_file = %s\n" %
self.path_get("etc/ceilometer/pipeline.yaml"))
f.write("[%s]\n" % acl.OPT_GROUP_NAME)
- f.write("auth_protocol = barttp\n")
+ f.write("auth_protocol = file\n")
f.write("auth_version = v2.0\n")
service.prepare_service(['ceilometer-api',
'--config-file=%s' % tmpfile])
cfg.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)