Test mode for the download service
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-download-manager |
Fix Released
|
Critical
|
Manuel de la Peña | ||
ubuntu-download-manager (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
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-
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
- PS Jenkins bot: Approve (continuous-integration)
- Mike McCracken (community): Approve
- Ying-Chun Liu (community): Approve
-
Diff: 885 lines (+392/-150)20 files modifiedlibubuntudownloadmanager/application.cpp (+19/-14)
libubuntudownloadmanager/application.h (+2/-0)
libubuntudownloadmanager/download_daemon.cpp (+123/-111)
libubuntudownloadmanager/download_daemon.h (+5/-5)
libubuntudownloadmanager/download_factory.cpp (+20/-0)
libubuntudownloadmanager/download_factory.h (+5/-0)
libubuntudownloadmanager/download_manager.cpp (+26/-4)
libubuntudownloadmanager/download_manager.h (+6/-0)
libubuntudownloadmanager/request_factory.cpp (+43/-13)
libubuntudownloadmanager/request_factory.h (+5/-0)
ubuntu-download-manager-tests/fake_application.cpp (+18/-1)
ubuntu-download-manager-tests/fake_application.h (+5/-0)
ubuntu-download-manager-tests/fake_download_manager.cpp (+24/-0)
ubuntu-download-manager-tests/fake_download_manager.h (+2/-0)
ubuntu-download-manager-tests/fake_request_factory.cpp (+25/-0)
ubuntu-download-manager-tests/fake_request_factory.h (+2/-0)
ubuntu-download-manager-tests/test_download_daemon.cpp (+41/-0)
ubuntu-download-manager-tests/test_download_daemon.h (+3/-0)
ubuntu-download-manager-tests/test_download_manager.cpp (+15/-2)
ubuntu-download-manager-tests/test_download_manager.h (+3/-0)
affects: | ubuntu-system-image → ubuntu-download-manager |
Changed in ubuntu-download-manager: | |
status: | New → Confirmed |
importance: | Undecided → Low |
milestone: | none → 0.4 |
Changed in ubuntu-download-manager: | |
importance: | Low → Critical |
assignee: | nobody → Manuel de la Peña (mandel) |
status: | Confirmed → In Progress |
Changed in ubuntu-download-manager: | |
status: | Fix Committed → Fix Released |
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).