[darcs-users] [patch334] Test for issue1599: expire unused caches [status=clarification-requested]

Eric Kow kowey at darcs.net
Sun Aug 8 13:50:42 UTC 2010


OK, this seems like a fairly straightforward way to test, but where does
this dummyRepo come from?

On Sat, Aug 07, 2010 at 21:11:53 +0000, Adolfo Builes wrote:
> +serve_http # sets baseurl
> +darcs get --lazy $baseurl/R S
> +rm S/_darcs/prefs/sources
> +echo "repo:http://10.1.2.3/S" >> S/_darcs/prefs/sources

Do we assume that http://10.1.2.3/S is an unreachable repo here?

It may be reasonable, but I wonder if we have a way to skew things so
that so it's even less likely to be something reachable.  Like is there
some sort of canonical "bad" IP address?

> +echo "repo:$baseurl/dummyRepo" >> S/_darcs/prefs/sources
> +echo "repo:~/test1599/S" >> S/_darcs/prefs/sources
> +echo "repo:$baseurl/R" >> S/_darcs/prefs/sources
> +darcs changes --repo S --debug --verbose --no-cache 2>&1 | tee log
> +c=`grep -c "URL.waitUrl http://10.1.2.3/S" log`
> +c1=`grep -c "URL.waitUrl $baseurl/dummyRepo" log`
> +c2=`grep -c "~/test1599/S" log`
> +[ $c  -eq 1 ] && [ $c1 -eq 2 ] && [ $c2 -eq 1 ]

Testing here is based on word counts, which seems fine.

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, please try +44 (0)1273 64 2905.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20100808/5d475308/attachment.pgp>


More information about the darcs-users mailing list