summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools
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:54:54 -0400
commitb39dc4c0b5aa1cf35d89d3f72673d24083a0a92f (patch)
treee405058f25030c9a98651461d2971506f37947dd /meta-openstack/recipes-devtools
parent67bccbcef954741c496bcb4368280ebd7e9d967e (diff)
downloadmeta-cloud-services-b39dc4c0b5aa1cf35d89d3f72673d24083a0a92f.tar.gz
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/recipes-devtools')
-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 0000000..7756dca
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-ceilometer/Use-known-protocol-scheme-in-keystone-tests.patch
@@ -0,0 +1,85 @@
1Use known protocol scheme in keystone tests
2
3Commit e5b7606eaa94033256eb1aca5f6a6eed4f9e54a0 from
4https://github.com/openstack/ceilometer.git master
5
6With the recent introduction of the identity_uri in keystoneclient,
7there is a small backward incompatible change which means that weird
8protocols like the ones we use during tests aren't support properly
9anymore. The patch replaces "foottp" and "barttp" by "file" hopefully
10keeping testing coverage the same.
11
12Change-Id: Idb30ff3ee0ca50911e453899ad32e630f9b18724
13Closes-Bug: #1309092
14
15diff --git a/ceilometer/tests/api/v1/test_app.py b/ceilometer/tests/api/v1/test_app.py
16index fed5b8b..b25b7ef 100644
17--- a/ceilometer/tests/api/v1/test_app.py
18+++ b/ceilometer/tests/api/v1/test_app.py
19@@ -34,17 +34,17 @@ class TestApp(test.BaseTestCase):
20 self.CONF = self.useFixture(config.Config()).conf
21
22 def test_keystone_middleware_conf(self):
23- self.CONF.set_override("auth_protocol", "foottp",
24+ self.CONF.set_override("auth_protocol", "file",
25 group=acl.OPT_GROUP_NAME)
26 self.CONF.set_override("auth_version", "v2.0",
27 group=acl.OPT_GROUP_NAME)
28 self.CONF.set_override("auth_uri", None,
29 group=acl.OPT_GROUP_NAME)
30 api_app = app.make_app(self.CONF, attach_storage=False)
31- self.assertTrue(api_app.wsgi_app.auth_uri.startswith('foottp'))
32+ self.assertTrue(api_app.wsgi_app.auth_uri.startswith('file'))
33
34 def test_keystone_middleware_parse_conffile(self):
35- content = "[{0}]\nauth_protocol = barttp"\
36+ content = "[{0}]\nauth_protocol = file"\
37 "\nauth_version = v2.0".format(acl.OPT_GROUP_NAME)
38 tmpfile = fileutils.write_to_tempfile(content=content,
39 prefix='ceilometer',
40@@ -52,5 +52,5 @@ class TestApp(test.BaseTestCase):
41 service.prepare_service(['ceilometer-api',
42 '--config-file=%s' % tmpfile])
43 api_app = app.make_app(self.CONF, attach_storage=False)
44- self.assertTrue(api_app.wsgi_app.auth_uri.startswith('barttp'))
45+ self.assertTrue(api_app.wsgi_app.auth_uri.startswith('file'))
46 os.unlink(tmpfile)
47diff --git a/ceilometer/tests/api/v2/test_app.py b/ceilometer/tests/api/v2/test_app.py
48index 0b3ebcf..4e624bd 100644
49--- a/ceilometer/tests/api/v2/test_app.py
50+++ b/ceilometer/tests/api/v2/test_app.py
51@@ -42,7 +42,7 @@ class TestApp(base.BaseTestCase):
52 self.CONF = self.useFixture(config.Config()).conf
53
54 def test_keystone_middleware_conf(self):
55- self.CONF.set_override("auth_protocol", "foottp",
56+ self.CONF.set_override("auth_protocol", "file",
57 group=acl.OPT_GROUP_NAME)
58 self.CONF.set_override("auth_version", "v2.0",
59 group=acl.OPT_GROUP_NAME)
60@@ -52,14 +52,14 @@ class TestApp(base.BaseTestCase):
61 self.CONF.set_override("auth_uri", None, group=acl.OPT_GROUP_NAME)
62
63 api_app = app.setup_app()
64- self.assertTrue(api_app.auth_uri.startswith('foottp'))
65+ self.assertTrue(api_app.auth_uri.startswith('file'))
66
67 def test_keystone_middleware_parse_conffile(self):
68 pipeline_conf = self.path_get("/etc/ceilometer/pipeline.yaml")
69 content = "[DEFAULT]\n"\
70 "pipeline_cfg_file = {0}\n"\
71 "[{1}]\n"\
72- "auth_protocol = barttp\n"\
73+ "auth_protocol = file\n"\
74 "auth_version = v2.0\n".format(pipeline_conf,
75 acl.OPT_GROUP_NAME)
76
77@@ -70,7 +70,7 @@ class TestApp(base.BaseTestCase):
78 '--config-file=%s' % tmpfile])
79 self.CONF.set_override('connection', "log://", group="database")
80 api_app = app.setup_app()
81- self.assertTrue(api_app.auth_uri.startswith('barttp'))
82+ self.assertTrue(api_app.auth_uri.startswith('file'))
83 os.unlink(tmpfile)
84
85
diff --git a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
index 49ce448..4f557e1 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=stable/icehouse \
13 file://0001-sqlalchemy-fix-grouping-for-postgresql-databases.patch \ 13 file://0001-sqlalchemy-fix-grouping-for-postgresql-databases.patch \
14 file://fix_ceilometer_memory_leak.patch \ 14 file://fix_ceilometer_memory_leak.patch \
15 file://ceilometer-builtin-tests-config-location.patch \ 15 file://ceilometer-builtin-tests-config-location.patch \
16 file://Use-known-protocol-scheme-in-keystone-tests.patch \
16" 17"
17 18
18SRCREV="c8733b2bc1301bc8dd5119a630d855ace1c747bf" 19SRCREV="c8733b2bc1301bc8dd5119a630d855ace1c747bf"