~zulcss/ceilometer/havana-alarms-ftbfs

« back to all changes in this revision

Viewing changes to debian/patches/skip-database-tests.patch

  • Committer: Adam Gandelman
  • Date: 2013-09-06 22:44:44 UTC
  • Revision ID: adamg@canonical.com-20130906224444-br5jdh16s3tjgdxb
Patch refresh.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff --git a/ceilometer/tests/db.py b/ceilometer/tests/db.py
2
 
index 6a767cf..58f2539 100644
3
 
--- a/ceilometer/tests/db.py
4
 
+++ b/ceilometer/tests/db.py
5
 
@@ -41,8 +41,8 @@ class TestBase(test_base.TestCase):
 
1
Index: ceilometer/ceilometer/tests/db.py
 
2
===================================================================
 
3
--- ceilometer.orig/ceilometer/tests/db.py      2013-09-06 15:44:10.699577986 -0700
 
4
+++ ceilometer/ceilometer/tests/db.py   2013-09-06 15:44:10.691577986 -0700
 
5
@@ -41,8 +41,8 @@
6
6
                 message='.*you must provide a username and password.*')
7
7
             try:
8
8
                 self.conn = storage.get_connection(cfg.CONF)
13
13
         self.conn.upgrade()
14
14
 
15
15
     def tearDown(self):
16
 
@@ -56,9 +56,7 @@ class MongoDBFakeConnectionUrl(object):
 
16
@@ -56,9 +56,7 @@
17
17
     def __init__(self):
18
18
         self.url = os.environ.get('CEILOMETER_TEST_MONGODB_URL')
19
19
         if not self.url:
24
24
 
25
25
     def __str__(self):
26
26
         return '%(url)s_%(db)s' % dict(url=self.url, db=uuid.uuid4().hex)
27
 
@@ -83,7 +81,4 @@ class MixinTestsWithBackendScenarios(object):
 
27
@@ -83,7 +81,4 @@
28
28
 
29
29
     scenarios = [
30
30
         ('sqlalchemy', dict(database_connection='sqlite://')),
32
32
-        ('hbase', dict(database_connection='hbase://__test__')),
33
33
-        ('db2', dict(database_connection=DB2FakeConnectionUrl())),
34
34
     ]
35
 
diff --git a/tests/agentbase.py b/tests/agentbase.py
36
 
index 7e8263b..28ddee3 100644
37
 
--- a/tests/agentbase.py
38
 
+++ b/tests/agentbase.py
39
 
@@ -174,7 +174,10 @@ class BaseAgentManagerTestCase(base.TestCase):
 
35
Index: ceilometer/tests/agentbase.py
 
36
===================================================================
 
37
--- ceilometer.orig/tests/agentbase.py  2013-09-06 15:44:10.699577986 -0700
 
38
+++ ceilometer/tests/agentbase.py       2013-09-06 15:44:10.691577986 -0700
 
39
@@ -174,7 +174,10 @@
40
40
         self.assertEqual(len(polling_tasks), 1)
41
41
         self.assertTrue(60 in polling_tasks.keys())
42
42
         self.mgr.interval_task(polling_tasks.values()[0])
48
48
         self.assertEqual(pub.samples[0], self.Pollster.test_data)
49
49
 
50
50
     def test_setup_polling_tasks_multiple_interval(self):
51
 
@@ -243,5 +246,8 @@ class BaseAgentManagerTestCase(base.TestCase):
 
51
@@ -243,5 +246,8 @@
52
52
         self.assertEqual(len(polling_tasks.keys()), 1)
53
53
         polling_tasks.get(10)
54
54
         self.mgr.interval_task(polling_tasks.get(10))
58
58
+        except:
59
59
+            self.skipTest("Skipped by Ubuntu")
60
60
         self.assertEqual(len(pub.samples), 0)
61
 
diff --git a/tests/alarm/test_notifier.py b/tests/alarm/test_notifier.py
62
 
index 3d71b75..46ea1aa 100644
63
 
--- a/tests/alarm/test_notifier.py
64
 
+++ b/tests/alarm/test_notifier.py
65
 
@@ -58,7 +58,10 @@ class TestAlarmNotifier(base.TestCase):
 
61
Index: ceilometer/tests/alarm/test_notifier.py
 
62
===================================================================
 
63
--- ceilometer.orig/tests/alarm/test_notifier.py        2013-09-06 15:44:10.699577986 -0700
 
64
+++ ceilometer/tests/alarm/test_notifier.py     2013-09-06 15:44:10.691577986 -0700
 
65
@@ -58,7 +58,10 @@
66
66
             'reason': 'Everything is on fire',
67
67
         }
68
68
         self.service.notify_alarm(context.get_admin_context(), data)
74
74
         self.assertEqual(len(notifications), 1)
75
75
         self.assertEqual(notifications[0], (
76
76
             urlparse.urlsplit(data['actions'][0]),
77
 
@@ -90,6 +93,7 @@ class TestAlarmNotifier(base.TestCase):
 
77
@@ -90,6 +93,7 @@
78
78
         return notification
79
79
 
80
80
     def test_notify_alarm_rest_action_ok(self):
82
82
         action = 'http://host/action'
83
83
 
84
84
         with mock.patch('eventlet.spawn_n', self._fake_spawn_n):
85
 
@@ -102,8 +106,11 @@ class TestAlarmNotifier(base.TestCase):
 
85
@@ -102,8 +106,11 @@
86
86
         action = 'https://host/action'
87
87
         certificate = "/etc/ssl/cert/whatever.pem"
88
88
 
96
96
 
97
97
         with mock.patch('eventlet.spawn_n', self._fake_spawn_n):
98
98
             with mock.patch.object(requests, 'post') as poster:
99
 
@@ -117,10 +124,13 @@ class TestAlarmNotifier(base.TestCase):
 
99
@@ -117,10 +124,13 @@
100
100
         certificate = "/etc/ssl/cert/whatever.pem"
101
101
         key = "/etc/ssl/cert/whatever.key"
102
102
 
114
114
 
115
115
         with mock.patch('eventlet.spawn_n', self._fake_spawn_n):
116
116
             with mock.patch.object(requests, 'post') as poster:
117
 
@@ -132,8 +142,11 @@ class TestAlarmNotifier(base.TestCase):
 
117
@@ -132,8 +142,11 @@
118
118
     def test_notify_alarm_rest_action_with_ssl_verify_disable_by_cfg(self):
119
119
         action = 'https://host/action'
120
120
 
128
128
 
129
129
         with mock.patch('eventlet.spawn_n', self._fake_spawn_n):
130
130
             with mock.patch.object(requests, 'post') as poster:
131
 
@@ -143,6 +156,7 @@ class TestAlarmNotifier(base.TestCase):
 
131
@@ -143,6 +156,7 @@
132
132
                                           verify=False)
133
133
 
134
134
     def test_notify_alarm_rest_action_with_ssl_verify_disable(self):
136
136
         action = 'https://host/action?ceilometer-alarm-ssl-verify=0'
137
137
 
138
138
         with mock.patch('eventlet.spawn_n', self._fake_spawn_n):
139
 
@@ -155,8 +169,11 @@ class TestAlarmNotifier(base.TestCase):
 
139
@@ -155,8 +169,11 @@
140
140
     def test_notify_alarm_rest_action_with_ssl_verify_enable_by_user(self):
141
141
         action = 'https://host/action?ceilometer-alarm-ssl-verify=1'
142
142
 
150
150
 
151
151
         with mock.patch('eventlet.spawn_n', self._fake_spawn_n):
152
152
             with mock.patch.object(requests, 'post') as poster:
153
 
diff --git a/tests/api/v1/test_compute_duration_by_resource_scenarios.py b/tests/api/v1/test_compute_duration_by_resource_scenarios.py
154
 
index 775b890..5a2d26a 100644
155
 
--- a/tests/api/v1/test_compute_duration_by_resource_scenarios.py
156
 
+++ b/tests/api/v1/test_compute_duration_by_resource_scenarios.py
157
 
@@ -85,7 +85,10 @@ class TestComputeDurationByResource(tests_api.TestBase,
 
153
Index: ceilometer/tests/api/v1/test_compute_duration_by_resource_scenarios.py
 
154
===================================================================
 
155
--- ceilometer.orig/tests/api/v1/test_compute_duration_by_resource_scenarios.py 2013-09-06 15:44:10.699577986 -0700
 
156
+++ ceilometer/tests/api/v1/test_compute_duration_by_resource_scenarios.py      2013-09-06 15:44:10.691577986 -0700
 
157
@@ -85,7 +85,10 @@
158
158
         assert data['duration'] is None
159
159
 
160
160
     def _assert_times_match(self, actual, expected):
166
166
         assert actual == expected
167
167
 
168
168
     def test_overlap_range_start(self):
169
 
diff --git a/tests/api/v2/test_app.py b/tests/api/v2/test_app.py
170
 
index d829d47..44a9626 100644
171
 
--- a/tests/api/v2/test_app.py
172
 
+++ b/tests/api/v2/test_app.py
173
 
@@ -45,7 +45,10 @@ class TestApp(base.TestCase):
 
169
Index: ceilometer/tests/api/v2/test_app.py
 
170
===================================================================
 
171
--- ceilometer.orig/tests/api/v2/test_app.py    2013-09-06 15:44:10.699577986 -0700
 
172
+++ ceilometer/tests/api/v2/test_app.py 2013-09-06 15:44:10.691577986 -0700
 
173
@@ -45,7 +45,10 @@
174
174
         cfg.CONF.set_override("pipeline_cfg_file",
175
175
                               self.path_get("etc/ceilometer/pipeline.yaml"))
176
176
         cfg.CONF.set_override('connection', "log://", group="database")
182
182
         self.assertEqual(api_app.auth_protocol, 'foottp')
183
183
 
184
184
     def test_keystone_middleware_parse_conffile(self):
185
 
@@ -60,7 +63,10 @@ class TestApp(base.TestCase):
 
185
@@ -60,7 +63,10 @@
186
186
         service.prepare_service(['ceilometer-api',
187
187
                                  '--config-file=%s' % tmpfile])
188
188
         cfg.CONF.set_override('connection', "log://", group="database")
194
194
         self.assertEqual(api_app.auth_protocol, 'barttp')
195
195
         os.unlink(tmpfile)
196
196
 
197
 
diff --git a/tests/collector/dispatcher/test_db.py b/tests/collector/dispatcher/test_db.py
198
 
index 16e1d47..063d461 100644
199
 
--- a/tests/collector/dispatcher/test_db.py
200
 
+++ b/tests/collector/dispatcher/test_db.py
201
 
@@ -30,7 +30,10 @@ class TestDispatcherDB(tests_base.TestCase):
 
197
Index: ceilometer/tests/collector/dispatcher/test_db.py
 
198
===================================================================
 
199
--- ceilometer.orig/tests/collector/dispatcher/test_db.py       2013-09-06 15:44:10.699577986 -0700
 
200
+++ ceilometer/tests/collector/dispatcher/test_db.py    2013-09-06 15:44:10.691577986 -0700
 
201
@@ -30,7 +30,10 @@
202
202
 
203
203
     def setUp(self):
204
204
         super(TestDispatcherDB, self).setUp()
210
210
         self.ctx = None
211
211
 
212
212
     def test_valid_message(self):
213
 
diff --git a/tests/collector/test_service.py b/tests/collector/test_service.py
214
 
index 949d9b9..a8d49f2 100644
215
 
--- a/tests/collector/test_service.py
216
 
+++ b/tests/collector/test_service.py
217
 
@@ -114,7 +114,10 @@ class TestUDPCollectorService(TestCollector):
 
213
Index: ceilometer/tests/collector/test_service.py
 
214
===================================================================
 
215
--- ceilometer.orig/tests/collector/test_service.py     2013-09-06 15:44:10.699577986 -0700
 
216
+++ ceilometer/tests/collector/test_service.py  2013-09-06 15:44:10.691577986 -0700
 
217
@@ -115,7 +115,10 @@
218
218
 
219
219
     def setUp(self):
220
220
         super(TestUDPCollectorService, self).setUp()
226
226
         self.counter = sample.Sample(
227
227
             name='foobar',
228
228
             type='bad',
229
 
@@ -176,7 +179,10 @@ class TestCollectorService(TestCollector):
 
229
@@ -177,7 +180,10 @@
230
230
 
231
231
     def setUp(self):
232
232
         super(TestCollectorService, self).setUp()
238
238
         self.ctx = None
239
239
 
240
240
     @patch('ceilometer.pipeline.setup_pipeline', MagicMock())
241
 
@@ -184,8 +190,11 @@ class TestCollectorService(TestCollector):
 
241
@@ -185,8 +191,11 @@
242
242
         # If we try to create a real RPC connection, init_host() never
243
243
         # returns. Mock it out so we can establish the service
244
244
         # configuration.
252
252
 
253
253
     @patch('ceilometer.pipeline.setup_pipeline', MagicMock())
254
254
     def test_process_notification(self):
255
 
@@ -193,8 +202,11 @@ class TestCollectorService(TestCollector):
 
255
@@ -194,8 +203,11 @@
256
256
         # returns. Mock it out so we can establish the service
257
257
         # configuration.
258
258
         cfg.CONF.set_override("store_events", False, group="collector")
266
266
         self.srv.pipeline_manager.pipelines[0] = MagicMock()
267
267
         self.srv.notification_manager = test_manager.TestExtensionManager(
268
268
             [extension.Extension('test',
269
 
diff --git a/tests/compute/pollsters/test_location_metadata.py b/tests/compute/pollsters/test_location_metadata.py
270
 
index a2e5c18..ef887ee 100644
271
 
--- a/tests/compute/pollsters/test_location_metadata.py
272
 
+++ b/tests/compute/pollsters/test_location_metadata.py
273
 
@@ -47,7 +47,10 @@ class TestLocationMetadata(test_base.TestCase):
 
269
Index: ceilometer/tests/compute/pollsters/test_location_metadata.py
 
270
===================================================================
 
271
--- ceilometer.orig/tests/compute/pollsters/test_location_metadata.py   2013-09-06 15:44:10.699577986 -0700
 
272
+++ ceilometer/tests/compute/pollsters/test_location_metadata.py        2013-09-06 15:44:10.691577986 -0700
 
273
@@ -47,7 +47,10 @@
274
274
 
275
275
     @mock.patch('ceilometer.pipeline.setup_pipeline', mock.MagicMock())
276
276
     def setUp(self):
282
282
         super(TestLocationMetadata, self).setUp()
283
283
 
284
284
         # Mimics an instance returned from nova api call
285
 
diff --git a/tests/compute/test_manager.py b/tests/compute/test_manager.py
286
 
index 02eb612..33addf0 100644
287
 
--- a/tests/compute/test_manager.py
288
 
+++ b/tests/compute/test_manager.py
289
 
@@ -29,7 +29,10 @@ class TestManager(base.TestCase):
 
285
Index: ceilometer/tests/compute/test_manager.py
 
286
===================================================================
 
287
--- ceilometer.orig/tests/compute/test_manager.py       2013-09-06 15:44:10.699577986 -0700
 
288
+++ ceilometer/tests/compute/test_manager.py    2013-09-06 15:44:10.691577986 -0700
 
289
@@ -29,7 +29,10 @@
290
290
 
291
291
     @mock.patch('ceilometer.pipeline.setup_pipeline', mock.MagicMock())
292
292
     def test_load_plugins(self):
298
298
         self.assertIsNotNone(list(mgr.pollster_manager))
299
299
 
300
300
 
301
 
@@ -42,7 +45,10 @@ class TestRunTasks(agentbase.BaseAgentManagerTestCase):
 
301
@@ -42,7 +45,10 @@
302
302
         return instance
303
303
 
304
304
     def setup_manager(self):
310
310
 
311
311
     @mock.patch('ceilometer.pipeline.setup_pipeline', mock.MagicMock())
312
312
     def setUp(self):
313
 
diff --git a/tests/storage/test_get_engine.py b/tests/storage/test_get_engine.py
314
 
index 498b6f4..4824461 100644
315
 
--- a/tests/storage/test_get_engine.py
316
 
+++ b/tests/storage/test_get_engine.py
317
 
@@ -31,7 +31,10 @@ class EngineTest(testtools.TestCase):
 
313
Index: ceilometer/tests/storage/test_get_engine.py
 
314
===================================================================
 
315
--- ceilometer.orig/tests/storage/test_get_engine.py    2013-09-06 15:44:10.699577986 -0700
 
316
+++ ceilometer/tests/storage/test_get_engine.py 2013-09-06 15:44:10.691577986 -0700
 
317
@@ -31,7 +31,10 @@
318
318
         conf = mox.Mox().CreateMockAnything()
319
319
         conf.database = mox.Mox().CreateMockAnything()
320
320
         conf.database.connection = 'log://localhost'
326
326
         self.assertIsInstance(engine, impl_log.LogStorage)
327
327
 
328
328
     def test_get_engine_no_such_engine(self):
329
 
diff --git a/tests/test_bin.py b/tests/test_bin.py
330
 
index a358b57..bc2cd2a 100644
331
 
--- a/tests/test_bin.py
332
 
+++ b/tests/test_bin.py
333
 
@@ -36,14 +36,20 @@ class BinTestCase(base.TestCase):
 
329
Index: ceilometer/tests/test_bin.py
 
330
===================================================================
 
331
--- ceilometer.orig/tests/test_bin.py   2013-09-06 15:44:10.699577986 -0700
 
332
+++ ceilometer/tests/test_bin.py        2013-09-06 15:44:10.695577986 -0700
 
333
@@ -36,14 +36,20 @@
334
334
             tmp.write("connection=log://localhost\n")
335
335
 
336
336
     def test_dbsync_run(self):
357
357
 
358
358
 
359
359
 class BinSendCounterTestCase(base.TestCase):
360
 
@@ -59,11 +65,14 @@ class BinSendCounterTestCase(base.TestCase):
 
360
@@ -59,11 +65,14 @@
361
361
                 "pipeline_cfg_file=%s\n" % pipeline_cfg_file)
362
362
 
363
363
     def test_send_counter_run(self):
377
377
 
378
378
 
379
379
 class BinApiTestCase(base.TestCase):
380
 
@@ -92,8 +101,11 @@ class BinApiTestCase(base.TestCase):
 
380
@@ -92,8 +101,11 @@
381
381
                 "port=%s\n" % self.api_port)
382
382
             tmp.write("[database]\n")
383
383
             tmp.write("connection=log://localhost\n")
391
391
 
392
392
     def tearDown(self):
393
393
         super(BinApiTestCase, self).tearDown()
394
 
diff --git a/tests/test_notifier.py b/tests/test_notifier.py
395
 
index 814dca1..9a659fb 100644
396
 
--- a/tests/test_notifier.py
397
 
+++ b/tests/test_notifier.py
398
 
@@ -80,7 +80,10 @@ class TestNotifier(tests_base.TestCase):
 
394
Index: ceilometer/tests/test_notifier.py
 
395
===================================================================
 
396
--- ceilometer.orig/tests/test_notifier.py      2013-09-06 15:44:10.699577986 -0700
 
397
+++ ceilometer/tests/test_notifier.py   2013-09-06 15:44:10.695577986 -0700
 
398
@@ -80,7 +80,10 @@
399
399
             }],
400
400
             transformer_manager)
401
401
 
407
407
         self.assertEqual(len(pub.samples), 0)
408
408
         notifier.notify(None, MESSAGE)
409
409
         self.assertTrue(len(pub.samples) > 0)
410
 
diff --git a/tests/test_service.py b/tests/test_service.py
411
 
index 65580b6..8497648 100644
412
 
--- a/tests/test_service.py
413
 
+++ b/tests/test_service.py
414
 
@@ -98,8 +98,8 @@ class ServiceRestartTest(base.TestCase):
 
410
Index: ceilometer/tests/test_service.py
 
411
===================================================================
 
412
--- ceilometer.orig/tests/test_service.py       2013-09-06 15:44:10.699577986 -0700
 
413
+++ ceilometer/tests/test_service.py    2013-09-06 15:44:10.695577986 -0700
 
414
@@ -98,8 +98,8 @@
415
415
 
416
416
     def tearDown(self):
417
417
         super(ServiceRestartTest, self).tearDown()
422
422
 
423
423
     @staticmethod
424
424
     def _check_process_alive(pid):
425
 
@@ -143,7 +143,10 @@ class ServiceRestartTest(base.TestCase):
 
425
@@ -143,7 +143,10 @@
426
426
         self.check_process_alive()
427
427
 
428
428
     def _service_restart(self, cmd):
434
434
 
435
435
         self.assertTrue(self.sub.pid)
436
436
         #NOTE(Fengqian): Modify the pipleline configure file to see
437
 
@@ -159,7 +162,13 @@ class ServiceRestartTest(base.TestCase):
 
437
@@ -159,7 +162,13 @@
438
438
                           self.parse_output("Pipeline config: ").ret_stream))
439
439
 
440
440
     def test_compute_service_restart(self):