Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2366)

Issue 54720043: Auto detect proxy settings for local provider

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 3 months ago by thumper
Modified:
10 years, 3 months ago
Reviewers:
mp+202386, wallyworld
Visibility:
Public.

Description

Auto detect proxy settings for local provider Add methods to detect the proxy settings for both the environment and apt. The local provider now auto detects the proxy settings during the environment Prepare call. There were a few drive by fixes to use testbase commands instead of duplication. https://code.launchpad.net/~thumper/juju-core/local-provider-proxy-detection/+merge/202386 Requires: https://code.launchpad.net/~thumper/juju-core/config-proxy/+merge/202371 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 12

Patch Set 2 : Auto detect proxy settings for local provider #

Unified diffs Side-by-side diffs Delta from patch set Stats (+458 lines, -33 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
A juju/osenv/proxy.go View 1 chunk +34 lines, -0 lines 0 comments Download
A juju/osenv/proxy_test.go View 1 1 chunk +89 lines, -0 lines 0 comments Download
M juju/osenv/vars_test.go View 2 chunks +15 lines, -20 lines 0 comments Download
M provider/local/environprovider.go View 2 chunks +37 lines, -0 lines 0 comments Download
M provider/local/environprovider_test.go View 1 2 chunks +195 lines, -0 lines 0 comments Download
M testing/testbase/cleanup.go View 2 chunks +15 lines, -0 lines 0 comments Download
M utils/apt.go View 1 2 chunks +23 lines, -1 line 0 comments Download
M utils/apt_test.go View 1 8 chunks +48 lines, -12 lines 0 comments Download

Messages

Total messages: 3
thumper
Please take a look.
10 years, 3 months ago (2014-01-20 22:24:40 UTC) #1
wallyworld
LGTM with additional tests https://codereview.appspot.com/54720043/diff/1/juju/osenv/proxy_test.go File juju/osenv/proxy_test.go (right): https://codereview.appspot.com/54720043/diff/1/juju/osenv/proxy_test.go#newcode50 juju/osenv/proxy_test.go:50: c.Assert(proxies.Ftp, gc.Equals, "") There's no ...
10 years, 3 months ago (2014-01-20 22:43:21 UTC) #2
thumper
10 years, 3 months ago (2014-01-21 00:54:47 UTC) #3
Please take a look.

https://codereview.appspot.com/54720043/diff/1/juju/osenv/proxy_test.go
File juju/osenv/proxy_test.go (right):

https://codereview.appspot.com/54720043/diff/1/juju/osenv/proxy_test.go#newco...
juju/osenv/proxy_test.go:50: c.Assert(proxies.Ftp, gc.Equals, "")
On 2014/01/20 22:43:21, wallyworld wrote:
> There's no test that ftp proxy will return a value. The empty check is done
> above, ftp proxy needs to be filled in here

Done.

https://codereview.appspot.com/54720043/diff/1/provider/local/environprovider...
File provider/local/environprovider_test.go (right):

https://codereview.appspot.com/54720043/diff/1/provider/local/environprovider...
provider/local/environprovider_test.go:156: message: "apt-proxies not used of
apt-http-proxy set",
On 2014/01/20 22:43:21, wallyworld wrote:
> if

Done.

https://codereview.appspot.com/54720043/diff/1/provider/local/environprovider...
provider/local/environprovider_test.go:170: message: "apt-proxies not used of
apt-https-proxy set",
On 2014/01/20 22:43:21, wallyworld wrote:
> if

Done.

https://codereview.appspot.com/54720043/diff/1/provider/local/environprovider...
provider/local/environprovider_test.go:184: message: "apt-proxies not used of
apt-ftp-proxy set",
On 2014/01/20 22:43:21, wallyworld wrote:
> if

Done.

https://codereview.appspot.com/54720043/diff/1/utils/apt.go
File utils/apt.go (right):

https://codereview.appspot.com/54720043/diff/1/utils/apt.go#newcode80
utils/apt.go:80: // ftp proxy settings.
On 2014/01/20 22:43:21, wallyworld wrote:
> This comment is not quite fully accurate/complete

Done.

https://codereview.appspot.com/54720043/diff/1/utils/apt_test.go
File utils/apt_test.go (right):

https://codereview.appspot.com/54720043/diff/1/utils/apt_test.go#newcode91
utils/apt_test.go:91: Ftp:   "none",
On 2014/01/20 22:43:21, wallyworld wrote:
> we need two tests - one for none and one for a value. There's no test that ftp
> proxy will be correctly picked up

Yes there is. This method gets the ftp proxy.  The test below tests no output.
Added a new test.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b