Merge lp:~corey.bryant/ubuntu/trusty/python-boto/jenkins-2014-02-26 into lp:ubuntu/trusty-proposed/python-boto

Proposed by Corey Bryant on 2014-03-25
Status: Merged
Merge reported by: James Page
Merged at revision: not available
Proposed branch: lp:~corey.bryant/ubuntu/trusty/python-boto/jenkins-2014-02-26
Merge into: lp:ubuntu/trusty-proposed/python-boto
Diff against target: 59 lines (+30/-3)
3 files modified
debian/changelog (+8/-0)
debian/tests/unit (+14/-0)
tests/unit/ec2/test_connection.py (+8/-3)
To merge this branch: bzr merge lp:~corey.bryant/ubuntu/trusty/python-boto/jenkins-2014-02-26
Reviewer Review Type Date Requested Status
James Page 2014-03-25 Approve on 2014-03-27
Review via email: mp+212722@code.launchpad.net

Description of the change

  * Fix autopkgtest error in test_timeout
  * Add patch to work around autopkgtest failure in test_trim_defaults

To post a comment you must log in.
James Page (james-page) wrote :

Corey

Couple of comments

1) Assumption that home is /home/ubuntu

Might not be valid - I'd probably actually just create a tmp directory with the .ssh/known_hosts file and then override the HOME variable when running the test.

2) Could you detail in the changelog where you got the fix from - just for reference.

Makes it easier to drop when we get a new release.

Cheers

James

review: Needs Fixing
23. By Corey Bryant on 2014-03-26

* Fix autopkgtest error in test_timeout.
* Add patch to fix autopkgtest failure in test_trim_defaults.
  Taken from upstream git repository commits 3ebb667b and eb4c6e37.

James Page (james-page) :
review: Approve
James Page (james-page) wrote :

Uploaded to trusty

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 2014-02-26 15:51:00 +0000
3+++ debian/changelog 2014-03-26 18:49:32 +0000
4@@ -1,3 +1,11 @@
5+python-boto (2.20.1-2ubuntu2) UNRELEASED; urgency=medium
6+
7+ * Fix autopkgtest error in test_timeout.
8+ * Add patch to fix autopkgtest failure in test_trim_defaults.
9+ Taken from upstream git repository commits 3ebb667b and eb4c6e37.
10+
11+ -- Corey Bryant <corey.bryant@canonical.com> Wed, 26 Mar 2014 13:52:31 -0400
12+
13 python-boto (2.20.1-2ubuntu1) trusty; urgency=medium
14
15 * Add missing python-requests dependency, spotted by autopkgtest.
16
17=== modified file 'debian/tests/unit'
18--- debian/tests/unit 2013-12-27 15:09:08 +0000
19+++ debian/tests/unit 2014-03-26 18:49:32 +0000
20@@ -1,3 +1,17 @@
21 #/bin/sh
22
23+set -ex
24+
25+#Create temporary home directory with .ssh/known_hosts file
26+#so that test_timeout will be able to work.
27+home_orig=$HOME
28+home_temp=$(mktemp -d)
29+mkdir -p "$home_temp/.ssh"
30+touch "$home_temp/.ssh/known_hosts"
31+export HOME=$home_temp
32+
33 tests/test.py unit > /dev/null
34+
35+#Restore original home directory and remove temp home dir
36+export HOME=$home_orig
37+rm -rf $home_temp
38
39=== modified file 'tests/unit/ec2/test_connection.py'
40--- tests/unit/ec2/test_connection.py 2013-12-27 15:09:08 +0000
41+++ tests/unit/ec2/test_connection.py 2014-03-26 18:49:32 +0000
42@@ -976,9 +976,14 @@
43 now - timedelta(days=2),
44 now - timedelta(days=7),
45 now - timedelta(days=14),
46- datetime(now.year, now.month, 1) - timedelta(days=30),
47- datetime(now.year, now.month, 1) - timedelta(days=60),
48- datetime(now.year, now.month, 1) - timedelta(days=90)
49+ # We want to simulate 30/60/90-day snapshots, but February is
50+ # short (only 28 days), so we decrease the delta by 2 days apiece.
51+ # This prevents the ``delete_snapshot`` code below from being
52+ # called, since they don't fall outside the allowed timeframes
53+ # for the snapshots.
54+ datetime(now.year, now.month, 1) - timedelta(days=28),
55+ datetime(now.year, now.month, 1) - timedelta(days=58),
56+ datetime(now.year, now.month, 1) - timedelta(days=88)
57 ]
58
59 for date in dates:

Subscribers

People subscribed via source and target branches

to all changes: