darcs

Patch 326 Add a simple non-network test for darcs get over http.

Title Add a simple non-network test for darcs get over http.
Superseder Nosy List abuiles, kowey, mornfall
Related Issues
Status accepted Assigned To
Milestone

Created on 2010-08-04.18:49:41 by mornfall, last changed 2011-05-10.19:06:15 by darcswatch. Tracked on DarcsWatch.

Files
File name Status Uploaded Type Edit Remove
add-a-simple-non_network-test-for-darcs-get-over-http_.dpatch mornfall, 2010-08-04.19:11:20 text/x-darcs-patch
unnamed mornfall, 2010-08-04.18:49:41
unnamed mornfall, 2010-08-04.19:11:20
See mailing list archives for discussion on individual patches.
Messages
msg11948 (view) Author: mornfall Date: 2010-08-04.18:49:41
Hi,

this is a simple proof-of-concept for tests of HTTP functionality that do not
need actual network connectivity and are generally self-contained. The downside
is that they do need lighttpd installed (and currently also the port 23032 on
localhost to be free, although we could improve on that).

Yours,
   Petr.

PS: We may need to sanitize the environment for non-network tests, so that
proxy settings do not leak in there, for some better reliability.

1 patch for repository http://darcs.net/:

Wed Aug  4 20:49:00 CEST 2010  Petr Rockai <me@mornfall.net>
  * Add a simple non-network test for darcs get over http.
Attachments
msg11950 (view) Author: mornfall Date: 2010-08-04.19:11:20
Improved version, now also with a test for http get with packs.

2 patches for repository http://darcs.net/:

Wed Aug  4 21:09:27 CEST 2010  Petr Rockai <me@mornfall.net>
  * Add a simple non-network test for darcs get over http.

Wed Aug  4 21:09:30 CEST 2010  Petr Rockai <me@mornfall.net>
  * Add a simple test for http get with packs.
Attachments
msg11964 (view) Author: kowey Date: 2010-08-04.22:29:44
Check this out, Adolfo
msg12028 (view) Author: darcswatch Date: 2010-08-07.16:42:07
This patch bundle (with 2 patches) was just applied to the repository http://darcs.net/.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-3b00a607c772c6fa26a6b94001465308516cd3ad
msg12047 (view) Author: kowey Date: 2010-08-08.12:24:24
On Wed, Aug 04, 2010 at 18:49:41 +0000, Petr Ročkai wrote:
> this is a simple proof-of-concept for tests of HTTP functionality that do not
> need actual network connectivity and are generally self-contained. The downside
> is that they do need lighttpd installed (and currently also the port 23032 on
> localhost to be free, although we could improve on that).

Key points from Petr's patch:

- if lighttpd is not installed, the lib just exit 200s; skipping any
  test that calls serve_http

- the test has the responsibility of calling finish_http
  Do we need to do something more clever to make sure we
  don't accidentally have a bunch of these lighttpds running 
  should a test fail?

- is there something similar we could do for ssh?

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, please try +44 (0)1273 64 2905.
msg12053 (view) Author: kowey Date: 2010-08-08.13:00:44
On Sun, Aug 08, 2010 at 13:27:23 +0100, Eric Kow wrote:
> - the test has the responsibility of calling finish_http
>   Do we need to do something more clever to make sure we
>   don't accidentally have a bunch of these lighttpds running 
>   should a test fail?

It doesn't so we don't; I just wasn't paying enough attention, sorry!

I later noticed that serve_http already does

    trap "finish_http \"$PWD\"" EXIT

(I'm not used to using trap so the thought never occurs to me.
Seems really handy.)

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, please try +44 (0)1273 64 2905.
msg14129 (view) Author: darcswatch Date: 2011-05-10.18:36:32
This patch bundle (with 2 patches) was just applied to the repository http://darcs.net/reviewed.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-3b00a607c772c6fa26a6b94001465308516cd3ad
History
Date User Action Args
2010-08-04 18:49:41mornfallcreate
2010-08-04 18:52:15darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-c39d5ea1486e23842503e8a60143c458cb910184
2010-08-04 19:11:20mornfallsetfiles: + add-a-simple-non_network-test-for-darcs-get-over-http_.dpatch, unnamed
messages: + msg11950
2010-08-04 19:13:47darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-c39d5ea1486e23842503e8a60143c458cb910184 -> http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-3b00a607c772c6fa26a6b94001465308516cd3ad
2010-08-04 22:29:27koweysetfiles: - add-a-simple-non_network-test-for-darcs-get-over-http_.dpatch
2010-08-04 22:29:44koweysetnosy: + kowey, abuiles
messages: + msg11964
2010-08-07 16:42:07darcswatchsetstatus: needs-review -> accepted
messages: + msg12028
2010-08-08 12:24:24koweysetmessages: + msg12047
2010-08-08 13:00:44koweysetmessages: + msg12053
2011-05-10 18:36:32darcswatchsetmessages: + msg14129
2011-05-10 19:06:15darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-3b00a607c772c6fa26a6b94001465308516cd3ad -> http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-c39d5ea1486e23842503e8a60143c458cb910184