Merge lp:~brendan-donegan/ubuntu-community-testing/proxy_dict into lp:ubuntu-community-testing

Proposed by Brendan Donegan
Status: Merged
Merged at revision: 29
Proposed branch: lp:~brendan-donegan/ubuntu-community-testing/proxy_dict
Merge into: lp:ubuntu-community-testing
Diff against target: 22 lines (+7/-5)
1 file modified
ubuntu_pt_community/api/v1.py (+7/-5)
To merge this branch: bzr merge lp:~brendan-donegan/ubuntu-community-testing/proxy_dict
Reviewer Review Type Date Requested Status
Ubuntu Testcase Admins Pending
Review via email: mp+268313@code.launchpad.net

Commit message

Use squid proxy when calling PractiTest API

Description of the change

Use squid proxy when calling to PractiTest API

To post a comment you must log in.
30. By Brendan Donegan

Use proxy only for https

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu_pt_community/api/v1.py'
2--- ubuntu_pt_community/api/v1.py 2015-08-18 00:55:26 +0000
3+++ ubuntu_pt_community/api/v1.py 2015-08-18 10:58:29 +0000
4@@ -54,11 +54,13 @@
5 # smarter and more elegant.
6 # Currently will blow up if if doesn't validate.
7 auth.validate_request(request)
8- pt = practitest.PractitestSession(
9- **_read_config(os.path.join(
10- os.environ['CONFIG_DIR'], 'config.ini'
11- ))
12- )
13+ kwargs = _read_config(os.path.join(
14+ os.environ['CONFIG_DIR'], 'config.ini'
15+ ))
16+ kwargs['proxy_dict'] = {
17+ 'https': 'https://squid.internal:3128'
18+ }
19+ pt = practitest.PractitestSession(**kwargs)
20
21 try:
22 upload_json_data = request.files['data'].stream.getvalue()

Subscribers

People subscribed via source and target branches

to all changes: