aboutsummaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-ceilometer/Use-known-protocol-scheme-in-keystone-tests.patch
blob: 7756dca1a5a5d053c7e50ee207479b8b3bd0682b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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)