convert to dh_python2

Bug #802402 reported by Colin Watson
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
image-store-proxy (Ubuntu)
Confirmed
Undecided
Chuck Short

Bug Description

The attached patch converts image-store-proxy away from the deprecated python-central to dh_python2, which is a goal for Oneiric. See bug 788514.

However, when I tried to test-build this locally, I got the following test failures:

[FAIL]
Traceback (most recent call last):
  File "/home/cjwatson/src/ubuntu/image-store-proxy/tmp/image-store-proxy-1.0.4/build/lib.linux-i686-2.7/imagestore/lib/tests/mocker.py", line 102, in test_method_wrapper
    result = test_method()
  File "/home/cjwatson/src/ubuntu/image-store-proxy/tmp/image-store-proxy-1.0.4/build/lib.linux-i686-2.7/imagestore/tests/test_resources.py", line 341, in testCancel
    self.assertTrue(body.startswith('{"states":'), body)
  File "/usr/lib/python2.7/unittest/case.py", line 608, in deprecated_func
    return original_func(*args, **kwargs)
  File "/usr/lib/python2.7/unittest/case.py", line 420, in assertTrue
    raise self.failureException(msg)
twisted.trial.unittest.FailTest: {"error-message": "Bad request signature"}

imagestore.tests.test_resources.ResourcesTest.testCancel
===============================================================================
[FAIL]
Traceback (most recent call last):
  File "/home/cjwatson/src/ubuntu/image-store-proxy/tmp/image-store-proxy-1.0.4/build/lib.linux-i686-2.7/imagestore/lib/tests/mocker.py", line 102, in test_method_wrapper
    result = test_method()
  File "/home/cjwatson/src/ubuntu/image-store-proxy/tmp/image-store-proxy-1.0.4/build/lib.linux-i686-2.7/imagestore/tests/test_resources.py", line 383, in testClearError
    self.assertTrue(body.startswith('{"states":'), body)
  File "/usr/lib/python2.7/unittest/case.py", line 608, in deprecated_func
    return original_func(*args, **kwargs)
  File "/usr/lib/python2.7/unittest/case.py", line 420, in assertTrue
    raise self.failureException(msg)
twisted.trial.unittest.FailTest: {"error-message": "Bad request signature"}

imagestore.tests.test_resources.ResourcesTest.testClearError
===============================================================================
[FAIL]
Traceback (most recent call last):
  File "/home/cjwatson/src/ubuntu/image-store-proxy/tmp/image-store-proxy-1.0.4/build/lib.linux-i686-2.7/imagestore/lib/tests/mocker.py", line 102, in test_method_wrapper
    result = test_method()
  File "/home/cjwatson/src/ubuntu/image-store-proxy/tmp/image-store-proxy-1.0.4/build/lib.linux-i686-2.7/imagestore/tests/test_resources.py", line 410, in testImageUriEncodedWithUrlSafeBase64
    self.assertTrue(body.startswith('{"states":'), body)
  File "/usr/lib/python2.7/unittest/case.py", line 608, in deprecated_func
    return original_func(*args, **kwargs)
  File "/usr/lib/python2.7/unittest/case.py", line 420, in assertTrue
    raise self.failureException(msg)
twisted.trial.unittest.FailTest: {"error-message": "Bad request signature"}

imagestore.tests.test_resources.ResourcesTest.testImageUriEncodedWithUrlSafeBase64
===============================================================================
[FAIL]
Traceback (most recent call last):
  File "/home/cjwatson/src/ubuntu/image-store-proxy/tmp/image-store-proxy-1.0.4/build/lib.linux-i686-2.7/imagestore/lib/tests/mocker.py", line 102, in test_method_wrapper
    result = test_method()
  File "/home/cjwatson/src/ubuntu/image-store-proxy/tmp/image-store-proxy-1.0.4/build/lib.linux-i686-2.7/imagestore/tests/test_resources.py", line 281, in testInstall
    self.assertTrue(body.startswith('{"states":'), body)
  File "/usr/lib/python2.7/unittest/case.py", line 608, in deprecated_func
    return original_func(*args, **kwargs)
  File "/usr/lib/python2.7/unittest/case.py", line 420, in assertTrue
    raise self.failureException(msg)
twisted.trial.unittest.FailTest: {"error-message": "Bad request signature"}

imagestore.tests.test_resources.ResourcesTest.testInstall
===============================================================================
[FAIL]
Traceback (most recent call last):
  File "/home/cjwatson/src/ubuntu/image-store-proxy/tmp/image-store-proxy-1.0.4/build/lib.linux-i686-2.7/imagestore/lib/tests/mocker.py", line 102, in test_method_wrapper
    result = test_method()
  File "/home/cjwatson/src/ubuntu/image-store-proxy/tmp/image-store-proxy-1.0.4/build/lib.linux-i686-2.7/imagestore/tests/test_resources.py", line 314, in testInstallError
    self.assertStartsWith(body, '{"states":')
  File "/home/cjwatson/src/ubuntu/image-store-proxy/tmp/image-store-proxy-1.0.4/build/lib.linux-i686-2.7/imagestore/lib/tests/mocker.py", line 226, in failUnlessStartsWith
    (first, second))
twisted.trial.unittest.FailTest: '{"error-message": "Bad request signature"}' doesn't start with '{"states":'

imagestore.tests.test_resources.ResourcesTest.testInstallError
===============================================================================
[ERROR]
Traceback (most recent call last):
Failure: exceptions.ValueError: !IGNORED!

imagestore.tests.test_resources.ResourcesTest.testInstallWithBadSignature

Could you look into this, please?

Tags: patch
Revision history for this message
Colin Watson (cjwatson) wrote :
Revision history for this message
Barry Warsaw (barry) wrote :

Hi Colin. Is it possibly something odd about your build environment? With your patch it builds fine for me in an Oneiric pbuilder. I'll try a PPA/sbuild next.

imagestore.tests.test_resources
  ResourcesTest
    testCancel ... [OK]
    testCancelWithBadSignature ... [OK]
    testClearError ... [OK]
    testClearErrorWithBadSignature ... [OK]
    testDashboard ... [OK]
    testDashboardFailure ... [OK]
    testDashboardServiceError ... [OK]
    testGetSecretKeyFailure ... [OK]
    testImageUriEncodedWithUrlSafeBase64 ... [OK]
    testImageUriNotImplemented ... [OK]
    testInstall ... [OK]
    testInstallError ... [OK]
    testInstallWithBadSignature ... [OK]
    testInstallWithMissingSignature ... [OK]
    testInstallWithUnknownClientId ... [OK]
    testInstallWithoutClientId ... [OK]
    testSearch ... [OK]
    testStates ... [OK]
    testStatesWithoutUris ... [OK]

Changed in image-store-proxy (Ubuntu):
status: New → Incomplete
Revision history for this message
Barry Warsaw (barry) wrote :

Okay, it does fail in my PPA

Revision history for this message
Barry Warsaw (barry) wrote :

Verified that unchanged 1.0.4-0ubuntu3 also fails in an sbuild. Assigning to server team.

Changed in image-store-proxy (Ubuntu):
assignee: nobody → Canonical Server Team (canonical-server)
status: Incomplete → Confirmed
tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package image-store-proxy - 1.0.4-0ubuntu4

---------------
image-store-proxy (1.0.4-0ubuntu4) oneiric; urgency=low

  * Convert to dh_python2. (LP: #802402)
 -- Colin Watson <email address hidden> Sat, 25 Jun 2011 05:02:12 +0100

Changed in image-store-proxy (Ubuntu):
status: Confirmed → Fix Released
Barry Warsaw (barry)
Changed in image-store-proxy (Ubuntu):
status: Fix Released → Confirmed
Dave Walker (davewalker)
tags: added: server-o-ors
Dave Walker (davewalker)
tags: added: server-o-rs
removed: server-o-ors
Revision history for this message
Dave Walker (davewalker) wrote :

@zul, Are you still targeting this issue?

Thanks.

Changed in image-store-proxy (Ubuntu):
assignee: Canonical Server Team (canonical-server) → Ubuntu Server Team (ubuntu-server)
Dave Walker (davewalker)
Changed in image-store-proxy (Ubuntu):
assignee: Ubuntu Server Team (ubuntu-server) → Chuck Short (zulcss)
Dave Walker (davewalker)
Changed in image-store-proxy (Ubuntu):
milestone: none → oneiric-alpha-3
Dave Walker (davewalker)
Changed in image-store-proxy (Ubuntu):
milestone: oneiric-alpha-3 → ubuntu-11.10-beta-1
milestone: ubuntu-11.10-beta-1 → none
Dave Walker (davewalker)
Changed in image-store-proxy (Ubuntu):
milestone: none → ubuntu-11.10-beta-2
Dave Walker (davewalker)
Changed in image-store-proxy (Ubuntu):
milestone: ubuntu-11.10-beta-2 → ubuntu-11.10
Dave Walker (davewalker)
tags: removed: server-o-rs
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.