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

Proposed by Adam Gandelman
Status: Rejected
Rejected by: Adam Gandelman
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 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

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

Subscribers

People subscribed via source and target branches