aboutsummaryrefslogtreecommitdiffstats
path: root/meta-openstack
diff options
context:
space:
mode:
authorVu Tran <vu.tran@windriver.com>2014-06-18 15:49:10 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-06-23 15:55:46 -0400
commit6847948b8fe689af980c92469588c6dc7727d26e (patch)
treeaf7e3cbb49b6eca287dee07b2b4e72d89e038d33 /meta-openstack
parent29c47ac9790d87f0734e53a52c1bb9f70dc31f26 (diff)
downloadmeta-cloud-services-6847948b8fe689af980c92469588c6dc7727d26e.tar.gz
meta-cloud-services-6847948b8fe689af980c92469588c6dc7727d26e.tar.bz2
meta-cloud-services-6847948b8fe689af980c92469588c6dc7727d26e.zip
ceilometer builtin tests Use known protocol scheme
Commit e5b7606eaa94033256eb1aca5f6a6eed4f9e54a0 from https://github.com/openstack/ceilometer.git master 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. Signed-off-by: Vu Tran <vu.tran@windriver.com>
Diffstat (limited to 'meta-openstack')
-rw-r--r--meta-openstack/recipes-devtools/python/python-ceilometer/Use-known-protocol-scheme-in-keystone-tests.patch85
-rw-r--r--meta-openstack/recipes-devtools/python/python-ceilometer_git.bb1
2 files changed, 86 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-ceilometer/Use-known-protocol-scheme-in-keystone-tests.patch b/meta-openstack/recipes-devtools/python/python-ceilometer/Use-known-protocol-scheme-in-keystone-tests.patch
new file mode 100644
index 00000000..7756dca1
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-ceilometer/Use-known-protocol-scheme-in-keystone-tests.patch
@@ -0,0 +1,85 @@
+Use known protocol scheme in keystone tests
+
+Commit e5b7606eaa94033256eb1aca5f6a6eed4f9e54a0 from
+https://github.com/openstack/ceilometer.git master
+
+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
+
+diff --git a/ceilometer/tests/api/v1/test_app.py b/ceilometer/tests/api/v1/test_app.py
+index fed5b8b..b25b7ef 100644
+--- a/ceilometer/tests/api/v1/test_app.py
++++ b/ceilometer/tests/api/v1/test_app.py
+@@ -34,17 +34,17 @@ class TestApp(test.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)
+ 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',
+@@ -52,5 +52,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)
+diff --git a/ceilometer/tests/api/v2/test_app.py b/ceilometer/tests/api/v2/test_app.py
+index 0b3ebcf..4e624bd 100644
+--- a/ceilometer/tests/api/v2/test_app.py
++++ b/ceilometer/tests/api/v2/test_app.py
+@@ -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,14 +52,14 @@ 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")
+ content = "[DEFAULT]\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)
+
+@@ -70,7 +70,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)
+
+
diff --git a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
index a867bcfa..3d99d054 100644
--- a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
@@ -13,6 +13,7 @@ SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=master \
file://0001-sqlalchemy-fix-grouping-for-postgresql-databases.patch \
file://fix_ceilometer_memory_leak.patch \
file://ceilometer-builtin-tests-config-location.patch \
+ file://Use-known-protocol-scheme-in-keystone-tests.patch \
"
SRCREV="faada69444988c66a09ade812e10fa2ab5a0adae"