Test mode for the download service

Bug #1202809 reported by Barry Warsaw
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Released
Manuel de la Peña
ubuntu-download-manager (Ubuntu)

Bug Description

I just realized that there's one feature the client's built-in downloader has that we may need from the d/l service, if we want to adjust the client's test suite to use the d/l service.

The client will download files from both http and https urls. When downloading from https urls, of course the server's certificates must be checked. Python's urlopen() does this automatically, and I have tests to ensure this happens.

However, under many tests, we need to allow for self-signed certificates. This is because the client's test suite creates an http and https server with contents that mimic system-image.ubuntu.com. The https side of things uses a certificate generated solely for the test suite, and so urlopen() must be patched to accept self-signed certs. This is fairly easy to do in Python.

I'm not sure of the best way to enable this in the d/l service, which, under test must also accept self-signed certs, but generally should only accept certs signed by a CA in the Ubuntu system.

(Why does the test suite create its own http and https servers? We don't want the test suite to hit the real network, especially because when we run the test suite on the buildds, they will not have access to system-image.u.c.

Related branches

affects: ubuntu-system-image → ubuntu-download-manager
Changed in ubuntu-download-manager:
status: New → Confirmed
importance: Undecided → Low
milestone: none → 0.4
Revision history for this message
Javier Collado (javier.collado) wrote :

I need to write some upgrade tests that will benefit from having this. In
particular, I could use a testing server to verify that different upgrade
paths are correctly identified by the client.

As discussed today, the following changes are probably needed:
- Add another command line flag to accept self-signed certificates
- Add a command line flag to avoid the download server being killed by the
  lifecycle management process (this is to avoid the a new process being
  launched later using the command line without the option to accept the
  self-signed certificates).

tags: added: qa-touch
Changed in ubuntu-download-manager:
importance: Low → Critical
assignee: nobody → Manuel de la Peña (mandel)
status: Confirmed → In Progress
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:ubuntu-download-manager at revision 125, scheduled for release in ubuntu-download-manager, milestone 0.3

Changed in ubuntu-download-manager:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-download-manager - 0.2+13.10.20130920.1-0ubuntu1

ubuntu-download-manager (0.2+13.10.20130920.1-0ubuntu1) saucy; urgency=low

  [ Barry Warsaw ]
  * When extracting the QPair from _downloadProgress, use a reference
    local variable so that a new QPair isn't created, thus throwing away
    the update. (LP: #1226243)

  [ Manuel de la Pena ]
  * Fixes the irl example in the test folder. (LP: #1221598)
  * Added a class that provides a way to generate secure paths to
    appamor confined applications.
  * Make use of the apparmor class to build secure dbus paths. (LP:
  * Increases the test coverage of the download factory class.
  * Added the new metadata key 'objectpath' where the client can propose
    a uuid for the download that will be used to create the path. (LP:
  * Change the interface name so that is less confusing. (LP: #1224538)
  * Fixed the location where the file is stored. If the local-file
    metadata is provided and the app is not cofined that would be the
    used file else the XDG/APP_ID one will be used. (LP: #1224641,
  * Provide two command line args to be used in tests. (LP: #1202809)
  * Set the accept-encoding header to 'identity' so that we do not
    expand any download. (LP: #1224678)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 126
 -- Ubuntu daily release <email address hidden> Fri, 20 Sep 2013 10:03:28 +0000

Changed in ubuntu-download-manager (Ubuntu):
status: New → Fix Released
Changed in ubuntu-download-manager:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related blueprints