darcs

Issue 1629 record / amend-record --test does not pass http_proxy to the tests

Title record / amend-record --test does not pass http_proxy to the tests
Priority not-our-bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, galbolle, twb
Assigned To
Topics Devel, HTTP

Created on 2009-09-25.13:37:48 by galbolle, last changed 2009-10-02.10:05:24 by kowey.

Messages
msg8874 (view) Author: galbolle Date: 2009-09-25.13:37:44
The current darcs testsuite requires network connectivity (to http servers)

When behind an http proxy, doing http_proxy=wwwcache cabal test works. darcs
record --test hangs trying to connect to the http servers during the test suite.
Probably, the environment variable is not passed to the test suite.
msg8885 (view) Author: twb Date: 2009-09-30.06:53:42
On Fri, Sep 25, 2009 at 01:37:44PM +0000, Florent Becker wrote:
> The current darcs testsuite requires network connectivity (to http servers)

I can confirm that this is restricted to the tests in tests/network.

> When behind an http proxy, doing http_proxy=wwwcache cabal test works.

"cabal test" does not run the network tests.

> darcs record --test hangs trying to connect to the http servers
> during the test suite.

That is because it runs "runghc Setup test tests network", i.e. both
normal and network-dependent tests.

Are you sure that http_proxy=wwwcache is what you want?  Compare

    env -u http_proxy               curl -fvI http://example.net/
    http_proxy=wwwcache             curl -fvI http://example.net/
    http_proxy=http://wwwcache:1080 curl -fvI http://example.net/
msg8886 (view) Author: twb Date: 2009-09-30.07:04:15
PS: I simulated an environment in which a proxy is required, by adding

    127.0.0.1 darcs.net

to /etc/hosts.  Now:

    $ getent hosts darcs.net
    127.0.0.1       darcs.net
    $ env -u http_proxy curl -vI http://darcs.net/
    * About to connect() to darcs.net port 80 (#0)
    *   Trying 127.0.0.1... Connection refused
    * couldn't connect to host
    * Closing connection #0
    curl: (7) couldn't connect to host
    $ curl -I http://darcs.net/
    HTTP/1.0 200 OK
    [...]

Here, "./Setup test network" passes iff http_proxy is set.
msg8899 (view) Author: galbolle Date: 2009-10-02.09:54:37
That was a momentary problem with my proxy, sorry for the noise.
History
Date User Action Args
2009-09-25 13:37:48galbollecreate
2009-09-30 06:53:44twbsetnosy: + twb
messages: + msg8885
2009-09-30 07:04:18twbsetnosy: darcs-devel, twb, dmitry.kurochkin, galbolle
messages: + msg8886
2009-10-02 09:54:40galbollesetstatus: unknown -> resolved
nosy: darcs-devel, twb, dmitry.kurochkin, galbolle
messages: + msg8899
2009-10-02 10:05:24koweysetpriority: bug -> not-our-bug
nosy: darcs-devel, twb, dmitry.kurochkin, galbolle
topic: + HTTP