Merge lp:~gandelman-a/ubuntu/saucy/cinder/fix_image_tests into lp:~openstack-ubuntu-testing/cinder/havana

Proposed by Adam Gandelman on 2013-05-28
Status: Rejected
Rejected by: Adam Gandelman on 2013-05-29
Proposed branch: lp:~gandelman-a/ubuntu/saucy/cinder/fix_image_tests
Merge into: lp:~openstack-ubuntu-testing/cinder/havana
Diff against target: 97 lines (+50/-21)
3 files modified
debian/changelog (+4/-21)
debian/patches/glanceclient_test_fix.patch (+45/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~gandelman-a/ubuntu/saucy/cinder/fix_image_tests
Reviewer Review Type Date Requested Status
Openstack Ubuntu Testers 2013-05-28 Pending
Review via email: mp+166158@code.launchpad.net

Description of the change

Applying a patch that is currently in review @ https://review.openstack.org/#/c/30795/ Remove it if it gets merged. Not sure if this is a valid upstream bug. Upstream CI currently uses python-glanceclient (and all other clients) from pypi, not trunk (like us) Test suite needs to stub out some other method if using newer glanceclient.

To post a comment you must log in.

Unmerged revisions

104. By Adam Gandelman on 2013-05-28

debian/glanceclient_test_fix.patch: Stub out another glanceclient
method that blocks tests. (LP: #1185178)

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-05-28 19:38:42 +0000
3+++ debian/changelog 2013-05-28 23:53:25 +0000
4@@ -1,23 +1,4 @@
5-cinder (1:2013.2.a278.g05ce36a-0ubuntu1) UNRELEASED; urgency=low
6-
7- [ Chuck Short ]
8- * New upstream version.
9- * debian/patches/fix_cinder_dependencies.patch: Dropped.
10- * debian/control: Bump standards version to 3.9.4.
11- * debian/control: Add python-pbr and python-d2to1 to build-depends.
12- * debian/control: Add python-testtools and python-fixtures to build-depends
13- * debian/rules: Add work around to remove wonky setup.py setup
14- * debian/cinder-common.install: Add cinder-rpc-zmq-receiver binary.
15-
16- [ James Page ]
17- * debian/control: Drop surplus dependency on python-glance (LP: #1175600).
18- * debian/control,rules: Drop dependency on pep8, don't run pep8 tests during
19- package build process (its just way to late).
20- * debian/control: Drop surplus BD on python-cheetah.
21-
22- -- Chuck Short <zulcss@ubuntu.com> Tue, 30 Apr 2013 08:09:08 -0500
23-
24-cinder (1:2013.2.a226.g1d6de0f-0ubuntu2) UNRELEASED; urgency=low
25+cinder (1:2013.2.a226.g1d6de0f-0ubuntu3) UNRELEASED; urgency=low
26
27 [ Chuck Short ]
28 * New upstream version.
29@@ -36,8 +17,10 @@
30 [ Adam Gandelman ]
31 * debian/patches/avoid_paramiko_vers_depends.patch: Avoid version
32 requirement on paramiko.
33+ * debian/glanceclient_test_fix.patch: Stub out another glanceclient
34+ method that blocks tests. (LP: #1185178)
35
36- -- Adam Gandelman <adamg@ubuntu.com> Thu, 23 May 2013 19:12:56 -0700
37+ -- Adam Gandelman <adamg@ubuntu.com> Tue, 28 May 2013 16:47:07 -0700
38
39 cinder (1:2013.1-0ubuntu2) raring; urgency=low
40
41
42=== added file 'debian/patches/glanceclient_test_fix.patch'
43--- debian/patches/glanceclient_test_fix.patch 1970-01-01 00:00:00 +0000
44+++ debian/patches/glanceclient_test_fix.patch 2013-05-28 23:53:25 +0000
45@@ -0,0 +1,45 @@
46+From 1365ada3bcd8b9f7f4c1c7f7c9f158fc9ae867b3 Mon Sep 17 00:00:00 2001
47+From: Adam Gandelman <adamg@canonical.com>
48+Date: Tue, 28 May 2013 14:34:30 -0700
49+Subject: [PATCH 1/1] test_glance.py: Stub out _get_member_model as well.
50+
51+glanceclient's v2 client needs to also have its _get_member_model()
52+stubbed out as well, to avoid attempts to reach 'fake_host' during
53+client instantiation.
54+
55+Update: Only stub when _get_member_model() when required.
56+
57+Change-Id: I943cbb017ccdbe4f6c994bc83cbefe8693f4672b
58+Fixes: bug #1185178.
59+---
60+ cinder/tests/image/test_glance.py | 11 +++++++++--
61+ 1 file changed, 9 insertions(+), 2 deletions(-)
62+
63+diff --git a/cinder/tests/image/test_glance.py b/cinder/tests/image/test_glance.py
64+index 46bbafa..116096f 100644
65+--- a/cinder/tests/image/test_glance.py
66++++ b/cinder/tests/image/test_glance.py
67+@@ -547,11 +547,18 @@ class TestGlanceClientVersion(test.TestCase):
68+ def setUp(self):
69+ super(TestGlanceClientVersion, self).setUp()
70+
71+- def fake_get_image_model(self):
72++ def fake_get_model(self):
73+ return
74+
75+ self.stubs.Set(glanceclient_v2, '_get_image_model',
76+- fake_get_image_model)
77++ fake_get_model)
78++
79++ try:
80++ self.stubs.Set(glanceclient_v2, '_get_member_model',
81++ fake_get_model)
82++ except AttributeError:
83++ # method requires stubbing only with newer glanceclients.
84++ pass
85+
86+ def test_glance_version_by_flag(self):
87+ """Test glance version set by flag is honoured"""
88+--
89+1.8.1.2
90+
91
92=== modified file 'debian/patches/series'
93--- debian/patches/series 2013-05-24 02:13:46 +0000
94+++ debian/patches/series 2013-05-28 23:53:25 +0000
95@@ -1,1 +1,2 @@
96 avoid_paramiko_vers_depends.patch
97+glanceclient_test_fix.patch

Subscribers

People subscribed via source and target branches