From f86486f9ccb99115333691586ed4e99f074edc23 Mon Sep 17 00:00:00 2001 From: Vu Tran Date: Thu, 19 Jun 2014 10:33:03 -0400 Subject: ceilometer builtin skip failed unsupported db tests ceilometer tests against various databases: mongodb, db2, sqlalchemy, hbase. For mongodb and db2, tests use environment variables: CEILOMETER_TEST_MONGODB_URL and CEILOMETER_TEST_DB2_URL for supplying URL database connection into tests. As we do not support mangodb or db2, by not setting or setting bogus URLs to these two environment variables will cause tests to fail. These tests should be skipped as prerequisite is not satisfied. Therefore we modify ceilometer testcases for mongodb and db2 to be skipped instead of failed if CEILOMETER_TEST_MONGODB_URL and CEILOMETER_TEST_DB2_URL are not set. Signed-off-by: Vu Tran --- ...e-known-protocol-scheme-in-keystone-tests.patch | 85 ---------------------- 1 file changed, 85 deletions(-) delete mode 100644 meta-openstack/recipes-devtools/python/python-ceilometer/Use-known-protocol-scheme-in-keystone-tests.patch (limited to 'meta-openstack/recipes-devtools/python/python-ceilometer/Use-known-protocol-scheme-in-keystone-tests.patch') 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 deleted file mode 100644 index 7756dca..0000000 --- a/meta-openstack/recipes-devtools/python/python-ceilometer/Use-known-protocol-scheme-in-keystone-tests.patch +++ /dev/null @@ -1,85 +0,0 @@ -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) - - -- cgit v1.2.3-54-g00ecf