diff options
| author | Vu Tran <vu.tran@windriver.com> | 2014-06-18 15:49:10 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-06-23 15:55:46 -0400 |
| commit | 6847948b8fe689af980c92469588c6dc7727d26e (patch) | |
| tree | af7e3cbb49b6eca287dee07b2b4e72d89e038d33 /meta-openstack/recipes-devtools/python | |
| parent | 29c47ac9790d87f0734e53a52c1bb9f70dc31f26 (diff) | |
| download | meta-cloud-services-6847948b8fe689af980c92469588c6dc7727d26e.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/python')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-ceilometer/Use-known-protocol-scheme-in-keystone-tests.patch | 85 | ||||
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-ceilometer_git.bb | 1 |
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 @@ | |||
| 1 | Use known protocol scheme in keystone tests | ||
| 2 | |||
| 3 | Commit e5b7606eaa94033256eb1aca5f6a6eed4f9e54a0 from | ||
| 4 | https://github.com/openstack/ceilometer.git master | ||
| 5 | |||
| 6 | With the recent introduction of the identity_uri in keystoneclient, | ||
| 7 | there is a small backward incompatible change which means that weird | ||
| 8 | protocols like the ones we use during tests aren't support properly | ||
| 9 | anymore. The patch replaces "foottp" and "barttp" by "file" hopefully | ||
| 10 | keeping testing coverage the same. | ||
| 11 | |||
| 12 | Change-Id: Idb30ff3ee0ca50911e453899ad32e630f9b18724 | ||
| 13 | Closes-Bug: #1309092 | ||
| 14 | |||
| 15 | diff --git a/ceilometer/tests/api/v1/test_app.py b/ceilometer/tests/api/v1/test_app.py | ||
| 16 | index 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) | ||
| 47 | diff --git a/ceilometer/tests/api/v2/test_app.py b/ceilometer/tests/api/v2/test_app.py | ||
| 48 | index 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 a867bcf..3d99d05 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 \ | |||
| 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 | ||
| 18 | SRCREV="faada69444988c66a09ade812e10fa2ab5a0adae" | 19 | SRCREV="faada69444988c66a09ade812e10fa2ab5a0adae" |
