Merge lp:~zulcss/cinder/cinder-failed-tests into lp:~openstack-ubuntu-testing/cinder/grizzly

Proposed by Chuck Short
Status: Merged
Approved by: Yolanda Robla
Approved revision: 72
Merged at revision: 72
Proposed branch: lp:~zulcss/cinder/cinder-failed-tests
Merge into: lp:~openstack-ubuntu-testing/cinder/grizzly
Diff against target: 159 lines (+21/-101)
5 files modified
debian/changelog (+3/-0)
debian/patches/fix-ubuntu-tests.patch (+16/-0)
debian/patches/series (+1/-1)
debian/patches/skip_failed_tests.patch (+0/-99)
debian/rules (+1/-1)
To merge this branch: bzr merge lp:~zulcss/cinder/cinder-failed-tests
Reviewer Review Type Date Requested Status
Yolanda Robla (community) Approve
Review via email: mp+145614@code.launchpad.net

Description of the change

fixes cinder ftbfs.

To post a comment you must log in.
Revision history for this message
Yolanda Robla (yolanda.robla) wrote :

Looks good to me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-01-16 16:01:42 +0000
3+++ debian/changelog 2013-01-30 14:25:31 +0000
4@@ -7,6 +7,9 @@
5 [ James Page ]
6 * d/control: Add Suggests: python-hp3parclient for python-cinder.
7
8+ [ Chuck Short ]
9+ * debian/patches/fix-ubuntu-tests.patch: Fix failing tests
10+
11 -- Yolanda Robla <yolanda.robla@canonical.com> Mon, 14 Jan 2013 17:47:00 +0100
12
13 cinder (2013.1~g2-0ubuntu2) raring; urgency=low
14
15=== added file 'debian/patches/fix-ubuntu-tests.patch'
16--- debian/patches/fix-ubuntu-tests.patch 1970-01-01 00:00:00 +0000
17+++ debian/patches/fix-ubuntu-tests.patch 2013-01-30 14:25:31 +0000
18@@ -0,0 +1,16 @@
19+diff -Naurp cinder-2013.1.orig/cinder/tests/scheduler/test_capacity_weigher.py cinder-2013.1/cinder/tests/scheduler/test_capacity_weigher.py
20+--- cinder-2013.1.orig/cinder/tests/scheduler/test_capacity_weigher.py 2013-01-30 07:42:25.000000000 -0600
21++++ cinder-2013.1/cinder/tests/scheduler/test_capacity_weigher.py 2013-01-30 08:09:13.748906909 -0600
22+@@ -18,10 +18,12 @@ Tests For Capacity Weigher.
23+
24+ from cinder import context
25+ from cinder.openstack.common.scheduler.weights import HostWeightHandler
26++from cinder import flags
27+ from cinder import test
28+ from cinder.tests.scheduler import fakes
29+ from cinder.tests import utils as test_utils
30+
31++FLAGS = flags.FLAGS
32+
33+ class CapacityWeigherTestCase(test.TestCase):
34+ def setUp(self):
35
36=== modified file 'debian/patches/series'
37--- debian/patches/series 2013-01-14 16:48:12 +0000
38+++ debian/patches/series 2013-01-30 14:25:31 +0000
39@@ -1,2 +1,2 @@
40 fix_cinder_dependencies.patch
41-skip_failed_tests.patch
42+fix-ubuntu-tests.patch
43
44=== removed file 'debian/patches/skip_failed_tests.patch'
45--- debian/patches/skip_failed_tests.patch 2013-01-10 12:31:13 +0000
46+++ debian/patches/skip_failed_tests.patch 1970-01-01 00:00:00 +0000
47@@ -1,99 +0,0 @@
48-From 0a758a53c29364b7f52144f8f354b2121894e407 Mon Sep 17 00:00:00 2001
49-From: Yolanda Robla <yolanda.robla@canonical.com>
50-Date: Thu, 10 Jan 2013 11:02:41 +0000
51-Subject: [PATCH 2/2] Skip failing tests Signed-off-by: Yolanda Robla
52- <yolanda.robla@canonical.com>
53-
54----
55- cinder/tests/scheduler/test_capacity_weigher.py | 6 ++++++
56- cinder/tests/scheduler/test_filter_scheduler.py | 6 ++++++
57- cinder/tests/scheduler/test_host_filters.py | 4 ++++
58- 3 files changed, 16 insertions(+)
59-
60-diff --git a/cinder/tests/scheduler/test_capacity_weigher.py b/cinder/tests/scheduler/test_capacity_weigher.py
61-index 471364f..acee91d 100644
62---- a/cinder/tests/scheduler/test_capacity_weigher.py
63-+++ b/cinder/tests/scheduler/test_capacity_weigher.py
64-@@ -46,6 +46,8 @@ class CapacityWeigherTestCase(test.TestCase):
65- return host_states
66-
67- def test_default_of_spreading_first(self):
68-+ return True
69-+
70- hostinfo_list = self._get_all_hosts()
71-
72- # host1: free_capacity_gb=1024, free=1024*(1-0.1)
73-@@ -59,6 +61,8 @@ class CapacityWeigherTestCase(test.TestCase):
74- self.assertEqual(weighed_host.obj.host, 'host1')
75-
76- def test_capacity_weight_multiplier1(self):
77-+ return True
78-+
79- self.flags(capacity_weight_multiplier=-1.0)
80- hostinfo_list = self._get_all_hosts()
81-
82-@@ -73,6 +77,8 @@ class CapacityWeigherTestCase(test.TestCase):
83- self.assertEqual(weighed_host.obj.host, 'host4')
84-
85- def test_capacity_weight_multiplier2(self):
86-+ return True
87-+
88- self.flags(capacity_weight_multiplier=2.0)
89- hostinfo_list = self._get_all_hosts()
90-
91-diff --git a/cinder/tests/scheduler/test_filter_scheduler.py b/cinder/tests/scheduler/test_filter_scheduler.py
92-index 6f56575..784b99f 100644
93---- a/cinder/tests/scheduler/test_filter_scheduler.py
94-+++ b/cinder/tests/scheduler/test_filter_scheduler.py
95-@@ -41,6 +41,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase):
96- """
97- Ensure empty hosts & child_zones result in NoValidHosts exception.
98- """
99-+ return True
100-+
101- def _fake_empty_call_zone_method(*args, **kwargs):
102- return []
103-
104-@@ -55,6 +57,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase):
105- fake_context, request_spec, None)
106-
107- def test_create_volume_non_admin(self):
108-+ return True
109-+
110- """Test creating an instance locally using run_instance, passing
111- a non-admin context. DB actions should work."""
112- self.was_admin = False
113-@@ -79,6 +83,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase):
114- self.assertTrue(self.was_admin)
115-
116- def test_schedule_happy_day(self):
117-+ return True
118-+
119- """Make sure there's nothing glaringly wrong with _schedule()
120- by doing a happy day pass through."""
121-
122-diff --git a/cinder/tests/scheduler/test_host_filters.py b/cinder/tests/scheduler/test_host_filters.py
123-index 5bcffd6..b80024d 100644
124---- a/cinder/tests/scheduler/test_host_filters.py
125-+++ b/cinder/tests/scheduler/test_host_filters.py
126-@@ -76,6 +76,8 @@ class HostFiltersTestCase(test.TestCase):
127- self.stubs.Set(utils, 'service_is_up', fake_service_is_up)
128-
129- def test_capacity_filter_passes(self):
130-+ return True
131-+
132- self._stub_service_is_up(True)
133- filt_cls = self.class_map['CapacityFilter']()
134- filter_properties = {'size': 100}
135-@@ -87,6 +89,8 @@ class HostFiltersTestCase(test.TestCase):
136- self.assertTrue(filt_cls.host_passes(host, filter_properties))
137-
138- def test_capacity_filter_fails(self):
139-+ return True
140-+
141- self._stub_service_is_up(True)
142- filt_cls = self.class_map['CapacityFilter']()
143- filter_properties = {'size': 100}
144---
145-1.7.9.5
146-
147
148=== modified file 'debian/rules'
149--- debian/rules 2012-10-09 13:54:48 +0000
150+++ debian/rules 2013-01-30 14:25:31 +0000
151@@ -7,7 +7,7 @@
152 dh $@ --with python2
153
154 get-orig-source:
155- uscan --verbose --force-download --rename --destdir=../build-area
156+ uscan --verbose --rename --destdir=../build-area
157
158 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
159 override_dh_auto_test:

Subscribers

People subscribed via source and target branches